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?

2

2 Answers 2

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.

1
  • 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 Sep 25, 2016 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.

2
  • 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" Sep 27, 2016 at 16:34
  • But still asking for password 3 times and then -permission denied(public key). Sep 27, 2016 at 16:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .