SUSE Support

Here When You Need Us

ssh to non-root user still prompting for password after copying ssh keys

This document (7015340) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 11

Situation

ssh keys have been manually copied or ssh-copy-id as been run to copy the keys to a non-root user on the target server but when you ssh to that user on the target server you are still prompted for the password.  Running 'ssh -v <username>@<hostname> shows this message after you enter the password when it prompts:
 
debug1: Remote: Ignored authorized keys: bad ownership or modes for directory /home/<username>

Resolution

Check the permissions on the non-root users home folder.  If the folder has full permissions:
 
# ll /home/
drwxrwxrwx  5 <username> users      4096 Nov  1  2013 <username>
 
change the permissions to 755 with the chmod command.
 
chmod 755 /home/<username>
 
The permissions should now show this:
 
# ll /home/
drwxr-xr-x  5 <username> users      4096 Nov  1  2013 <username>
 
Now ssh'ing to the user won't prompt for the password.
 
 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7015340
  • Creation Date: 08-Jul-2014
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.