عبارة المرور الرئيسية SSH تعمل في Windows ولكن ليس في Linux

StackOverflow https://stackoverflow.com//questions/9631246

  •  10-12-2019
  •  | 
  •  

سؤال

أنا أعمل في مشروع في GIT. في Windows، أنا أستخدم ملحقات GIT لإدارة هذا المشروع، والوصول إلى المستودع العام أعطاني مفتاح .ppk.قمت بتحميله في تمديد GIT، مع عبارة المرور التي أعطيتها لي، وهي تعمل.

الآن أقوم بتعيين آلة ظاهرية Linux (Ubuntu-32bit)، وأريد الوصول أيضا من هذا الجهاز إلى المستودع.

من مؤشر ترابط آخر رأيته في هذا الموقع، أستخدمه، لاستنساخ المستودع، الأمر التالي: giveacodicetagpre.

بعد ذلك، تخبرني القذيفة بإدراج عبارة المرور giveacodicetagpre.

ولكن عندما أدرجها، أخبرني بذلك عبارة مرور سيئة.لقد راجعت ذلك في كثير من الأحيان، وأنا متأكد من أنني استخدم نفس عبارة المرور التي أستخدمها في Windows.فكيف يمكنني استخدام المفتاح بشكل صحيح في Linux؟

شكرا مقدما على ردودك.

هل كانت مفيدة؟

المحلول

The Linux SSH client (typically OpenSSH) can't read the PPK format used by the Windows SSH client Putty. You need to convert the "PPK" key given to you into an OpenSSH key first. Install "putty" on Linux and use the puttygen command line tool:

$ sudo aptitude install putty
$ mkdir -p ~/.ssh
$ puttygen ~/mykey.ppk -o ~/.ssh/id_rsa -O private-openssh

Enter your passphrase, and you'll get an OpenSSH-compatible key in the standard location ~/.ssh/id_rsa. Afterwards you can just use ssh-add(without any arguments!) to add this key to the SSH agent.

Alternatively you can use the PUTTYgen program provided by putty on Windows.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top