ssh key passphrase works in windows but not in linux

前端 未结 1 1275
星月不相逢
星月不相逢 2021-02-01 15:14

I\'m working to a project in git. In Windows, I\'m using git extensions to manage this project, and to access to the public repository they gave me a .ppk key. I load it into gi

1条回答
  •  生来不讨喜
    2021-02-01 15:46

    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.

    0 讨论(0)
提交回复
热议问题