ciphermethod.com

SSH Passwordless Login Fails

by on Oct.24, 2012, under Red Hat

After verifying file permissions, still unable to login without entering passsord. Found issue where SELINUX was keeping the SSH service from reading the authorized_keys file. Issue encountered on a Red Hat 6 server.

Fix:
$ restorecon -R -v /home/user/.ssh
restorecon reset /home/user/.ssh context unconfined_u:object_r:home_root_t:s0->unconfined_u:object_r:ssh_home_t:s0
restorecon reset /home/user/.ssh/known_hosts context unconfined_u:object_r:home_root_t:s0->unconfined_u:object_r:ssh_home_t:s0
restorecon reset /home/user/.ssh/id_dsa context unconfined_u:object_r:home_root_t:s0->unconfined_u:object_r:ssh_home_t:s0
restorecon reset /home/user/.ssh/id_dsa.pub context unconfined_u:object_r:home_root_t:s0->unconfined_u:object_r:ssh_home_t:s0
restorecon reset /home/user/.ssh/authorized_keys context unconfined_u:object_r:home_root_t:s0->unconfined_u:object_r:ssh_home_t:s0

Passwordless login now works:
$ ssh gilis28.fls
Last login: Wed Oct 3 14:07:00 2012 from 10.255.2.204
[user@GILIS28 ~]$


No comments for this entry yet...

Leave a Reply

You must be logged in to post a comment.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

But Wait, There's More!

A few highly recommended friends...