Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

SSH Key Problem

authentication networking

  • This topic is locked This topic is locked
2 replies to this topic

#1 Valor

Valor

    CC Regular

  • Just Joined
  • PipPipPip
  • 30 posts

Posted 05 November 2008 - 05:50 AM

When I try to SSH into my server using public/private key authentication it rejects and I see this error:

"Authentication refused: bad ownership or modes for directory /home/username/.ssh"


Anyone know what this means and how to fix the error?
  • 0

#2 Tor

Tor

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 448 posts

Posted 06 November 2008 - 08:42 AM

What does 'ls -la /home/username' and 'ls -la /home/username/.ssh/' show?
  • 0

#3 RHochstenbach

RHochstenbach

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 56 posts

Posted 28 May 2011 - 06:32 AM

This probably means that the permissions of your .ssh directory are wrongly configured. Try these commands on the server:
chown -R username /home/username/.ssh
chmod -R 700 /home/username/.ssh

If you get a permission denied message, try it as root. But that also indicates that the permissions of your home directory are also wrongly configured. So try these commands on your home folder (/home/username) as well.
  • 0





Also tagged with one or more of these keywords: authentication, networking

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download