Quantcast
Channel: setting up ssh public key - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 3

setting up ssh public key

$
0
0

Okay, so I'm trying to setup a login for logging in with ssh, using a public key.

First, I am using puttygen to generate a rsa-ssh2 public key using a passphrase. I followed the directions and generated the key. I saved the private key in its own file for putty and puttygen also generated the public key.

In putty I set it up to use the private key file and use rsa-ssh2 etc...

So I c/p'd my houtput ssh2 public key stuff from puttygen and on the server, I put that into

username/.ssh/authorized_keys

So I tried to then login through putty and first it prompted me for my username instead of asking for passphrase, and then when I entered it in (I tried both username and passphrase) it said my public key was invalid.

I thought maybe I somehow c/p'd or formatted the info into authorized_keys wrong, so I went back and double checked. I made sure it was all on one line, properly spaced etc...

I also checked in the following file /etc/ssh/ssh_config and I have the following:

IdentityFile ~/.ssh/id_rsa

I tried renaming my authorized_keys file to id_rsa and no joy.

I tried changing that line in ssh_config to

IdentityFile ~/.ssh/authorized_keys

...and no joy.

I went back to thinking maybe my public key was malformed or that putty wasn't configured properly so I asked a friend to make a temp account for me on his server and add my public key and I was able to login through putty just fine...when I connected to his server, it prompted me for the passphrase for my key and logged me in just fine.

So he suggested I look at that stuff above but no joy and he doesn't know what else to check soo...I guess I'm appealing to the experts here :P

thoughts?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>