0

Im connecting for the first time to a remote git server using bash.

These were my steps:

  1. Loaded the existing key in PUTTYgen

  2. Saved the .ppk private key and then exported to my .ssh as OpenSSH under the name id_rsa

  3. then I added the .ppk to PAGEANT

  4. On PUTTY, I entered the server IP I want to connect on port 22 and then went to SSH/AUTH in order to enter the path for the private key> C:\Users\Fabio.ssh\id_rsa

  5. Still in PUTTY, I went back to sessions, selected the IP, clicked on load, and then on open (things then loaded as if I could connect)

  6. then on git bash i entered

$ ssh -i "C:\users\path\to\id_rsa" "username@ip"

But at the end of this process I keep being asked on git bash for password. 3 times, actually and then -permission denied(public key).

Also, I add a variable GIT_SSH in the system pointing to PLINK.

What am I missing here, please?

0

So you want to specify the private key. It is usually id_rsa and not id_rsa.pub

$ ssh -i "C:\users\path\to\id_rsa" "username@ip"

I have not tried this, am on Linux.

  • I tried that now and I got same results. only this time I got also a key_load_public: invalid format before they asked me to enter the passphrase – Fabio Rossello Sep 25 '16 at 19:04
0

You need to export the private key in OpenSSH format from PuTTYgen, not just rename the PPK one. It will not work.

Also the IdentityFile points to the private key, not the public one.

  • I just followed you instructions. 1. Loaded the existing key in PUTTYgen, 2. Saved the .ppk private key and then exported to my .ssh as OpenSSH under the name id_rsa 3. then I added the .ppk to PAGEANT 4. On PUTTY, I entered the server IP I want to connect on port 22 and then went to SSH/AUTH in order to enter the path for the private key> C:\Users\Fabio\.ssh\id_rsa 5. Still in PUTTY, I went back to sessions, selected the IP, clicked on load, and then on open >>> things loaded as if I could connect 6. then on git bash i entered $ ssh -i "C:\users\path\to\id_rsa" "username@ip" – Fabio Rossello Sep 27 '16 at 16:34
  • But still asking for password 3 times and then -permission denied(public key). – Fabio Rossello Sep 27 '16 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.