SSH 키 암호는 Windows에서 작동하지만 Linux에서는 작동하지 않습니다.

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

  •  10-12-2019
  •  | 
  •  

문제

GIT에서 프로젝트로 일하고 있습니다. Windows에서는 Git Extensions를 사용 하여이 프로젝트를 관리하고 공개 저장소에 액세스하여 .ppk 키를 줬습니다.나는 그것을 git 확장자로로드하고, 그들이 나에게 주었던 암호문과 함께 작동하고 작동합니다.

이제 Linux (Ubuntu-32 비트) 가상 시스템을 설정 하고이 시스템에서 저장소로 액세스하려고합니다.

이 사이트에서 본 다른 스레드에서 저장소를 복제하려면 다음 명령을 복제합니다.

ssh-agent bash -c 'ssh-add /home/myHome/mykey.ppk; git clone git@serveraddress:project.git'
.

그런 다음 쉘은 암호를 삽입하라는 것을 알려줍니다

Enter passphrase for /home/myHome/mykey.ppk:
.

그러나 삽입 할 때, 그것은 나쁜 암호입니다.나는 그것을 많이 확인했으며, 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