SSH keys
I have been sent a pair of keys generated on remote host. I placed both keys in ~/.ssh and ~/.ssh2, however, I can't connect to the remote system when I run ssh user@host with a message Persmission denied (public key). I know the keys are correct and I don't have access to remote system, to sshd.
Other clients are able to connect to remote host using the keys. Version of ssh is 3.8.1p. Any help would be appricated |
Just to clarify, you did put them in ~/.ssh/authorized_keys, correct? (e.g. cat key1.pub >> ~/.ssh/authorized_keys) What does /var/log/secure say? Is it possible your sshd is configured to look for keys in some other file?
|
Quote:
I don't have access to it. Also, they keys on the remote host were generated properly and other hosts can connect to it using the same keys as I indicated in my original post. Thanks for you reply. |
Only ever really had problems other way round, but might be worth making sure your key folders are chmod 700 and the files themselves also..make sure they were ftp'ed and not copy/pasted (so there are no line breaks etc), I think ssh won't wont work if it feels something is insecure. Just possibilities I can think of.
|
Quote:
Could someone tell me where I could similar type questions? I have to fix this problem soon, I suspect there's compatibility problem between protocol 1 and protocol 2 Thanks everyone for replies. |
Hmm I'm probably blind, as just reread and you don't mention that you can connect to other hosts with them (but you do mention other hosts than you can connect to the remote), nor the chmod.
I think start from scratch and keep it clear as ssh keys can get messy if not extremely clear on everything, most problems are just a very simple to fix once its clear and its difficult for other people to fix ssh key problems without access without everything being extremely clear. Tell us exactly what filenames you have in each folder and its permissions and parent permissions and the format of the contents of each file. Also what other filenames you have and are connecting to different hosts with that work. I know you probably feel you are probably repeating yourself, but there's nothing like having output pasted of everything, so new readers are as clear as you are on your settings. Also do ssh -v user@host paste the output (or even ssh -vvv user@host will show more info), and paste it, hiding anything private. |
All times are GMT -5. The time now is 04:59 AM. |