LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   SSH keys (https://www.linuxquestions.org/questions/linux-security-4/ssh-keys-241888/)

alon005 10-12-2004 05:32 PM

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

TruckStuff 10-12-2004 09:03 PM

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?

alon005 10-12-2004 09:47 PM

Quote:

Originally posted by TruckStuff
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?
autorized_keys on the remote host to which i am trying to connect to?
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.

muman 10-13-2004 10:27 AM

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.

alon005 10-13-2004 06:04 PM

Quote:

Originally posted by alon005
autorized_keys on the remote host to which i am trying to connect to?
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.

If you have read my ealrier posts you'd have seen that I can connect to other hosts using .ssh .ssh2 holding the keys and these directories are chmod 'ed to 0700.

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.

muman 10-14-2004 03:39 AM

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.