0

I'm attempting to gain access to a web server using an SSH key.

I followed several steps to create my keys, had them uploaded and am still unable to connect.

In Git Bash (on Windows 8) I checked for existing keys:

ls -al ~/.ssh

When there were none, I created one with:

ssh-keygen -t rsa -b 4096 -C "myemail@mydomain.com"

I saved it in the default setting which seems to have been C:/home/.ssh, and I gave it a passphrase.

I was basically following the beginning of the github guide.

This generated me an id_rsa file and an id_rsa.pub file. The first was uploaded by the server administrator, and I'm attempting to log on now.

PuTTY can't use the id_rsa key as it is ("Unable to use key file (OpenSSH-2 private key)"), so I converted it using puttygen to pvtky.ppk.

I then just see "login as:", without the key error, but can't log in with anything.

I'm not asking asking for help in conjuring up a login, just trying to understand if my process was correct, as I expect it really wasn't, and if what I'm seeing is expected at this point.

EDIT: PuTTY raw errors:

Event Log: Reading private key file "C:\home.ssh\pvtky.ppk"

Event Log: Pageant is running. Requesting keys.

Event Log: Pageant has 0 SSH-2 keys

Event Log: Configured key file not in Pageant

Event Log: Offered public key

Event Log: Server refused our key

Event Log: Disconnected: No supported authentication methods available (server sent: publickey)

  • if you are in windows, you can skip putty and download cygwin and install the openssh package within it, and use ssh within cygwin – barlop May 19 '15 at 23:35
  • The first was uploaded by the server administrator, and I'm attempting to log on now.: You should "upload" the second, the id_rsa.pub. And you actually do not upload it, but rather put a fingerprint of it to authorized_keys file. But I hope your administrator knows. – Martin Prikryl May 20 '15 at 5:44
  • What does PuTTY show in its Event log? (include it into your question). – Martin Prikryl May 20 '15 at 5:45
  • Using SSH packets logging I was able to pick out a few of the event log errors. I'd added them to the question. – Twentyonehundred May 20 '15 at 8:24
0

It's not much direct help to your question of using ssh-keygen properly,I prefer using PuttyGen for my .PPK creation needs.

  • I used PuttyGen for creating my PPK. But I'm not sure what the difference is between the .ppk file and the ones I created with gitbash are. Or what creating a ppk from my id_rsa.pub using puttygen file actually did. – Twentyonehundred May 20 '15 at 8:18
0

there will be

pageant.exe

in putty installed folder

open it, then you can see its icon in systems tray right click on it and

add key

option

select your .ppk and add it

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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