LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-06-2010, 03:42 PM   #1
wacki
LQ Newbie
 
Registered: Aug 2005
Posts: 10

Rep: Reputation: 0
SSH Keys not working - in some accounts but not all


I have a cluster where the /home directories are nfs mounted. In some of the accounts the SSH keys have stopped working.

SSH works fine with all accounts. I just can't get passwordless login to work on *some* accounts.

The SSH keys are the same in all accounts so there's not corruption. md5sum confirms this. I've even copied them from working accounts to faulty ones and it made no difference. I've deleted the .ssh directory and created a new one. No effect.

The permissions of /home/ or /home/user1 are OK. I've changed them from wrxwrxwrx to wrx------ and it makes not difference.


Any ideas?

Last edited by wacki; 09-06-2010 at 04:16 PM.
 
Old 09-06-2010, 04:12 PM   #2
goldenbarb
Member
 
Registered: Aug 2010
Distribution: Fedora, Centos, Debian
Posts: 49

Rep: Reputation: 7
I think there are some problems with permission of ~/.ssh. Compare two dirs, working and not working.
Also you can check secure.log.
 
Old 09-06-2010, 05:00 PM   #3
wacki
LQ Newbie
 
Registered: Aug 2005
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by goldenbarb View Post
I think there are some problems with permission of ~/.ssh. Compare two dirs, working and not working.
Also you can check secure.log.
The permissions are fine. I can do a chmod 755 -R /home and it makes no impact on any of the accounts. I'll check secure.log. Can't believe I forgot to do that.

Last edited by wacki; 09-06-2010 at 05:03 PM.
 
Old 09-07-2010, 07:36 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Presumably they're using the right keys and the authorized_keys files are properly set up. Also, check your other SSH directives -- are you using AllowGroups or similar? As mentioned above, secure.log and other log files will probably lead to a sudden revelation.
 
Old 09-12-2010, 11:44 PM   #5
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
I'll also mention that permissions and ownership are important if the sshd has strict mode enabled (which I think it usually is by default). The home directory needs to be owned by the user, and should be 700. .ssh should also be 700, and finally the authorized_keys file should be 600. If you're still having trouble figuring out the problem, as other posters mentioned, check /var/log/secure. And of course, you can use the "-v" flag (or even "-vv") with your ssh client to get more debugging info about why the connection is failing.

ssh -v chris@remotehost
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh public keys not working war1025 Debian 2 06-21-2009 09:31 PM
ssh using keys not working deadlock Linux - Newbie 4 01-11-2008 03:37 AM
ssh using keys not working deadlock Linux - Newbie 1 01-10-2008 08:41 AM
SSH keys not working GATTACA Linux - Server 8 07-10-2007 10:59 AM
SSH public keys not working - RH 7.3 menator Linux - Newbie 7 11-03-2005 03:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration