Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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?
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.
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.