SSH Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys
From nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) (Vivek Gite) to All on Fri Jan 10 15:26:19 2025
I
'm trying to login using ssh keys but server is only allows to login me using a password. The following message is logged into my Linux or Unix server /var/log/secure or /var/log/auth.log file:
Feb 25 06:36:50 ns5 sshd[26681]: Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys2
Here is another message:
May 24 18:28:35 ls-www-1 sshd[531320]: Connection closed by 18.1.2.3 port 43640 [preauth]
May 24 18:28:44 ls-www-1 sshd[531322]: Authentication refused: bad ownership or modes for file /home/admin/.ssh/authorized_keys
May 24 18:28:44 ls-www-1 sshd[531322]: Connection closed by authenticating user admin 18.1.2.3 port 43650 [preauth]
How do I fix this problem?
Love this? sudo share_on:
Twitter
-
Facebook
-
LinkedIn
-
Whatsapp
-
Reddit
The post
SSH Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys
appeared first on
nixCraft
.
Who's Online
Recent Visitors
Rixter
Sat Dec 6 07:34:36 2025
from
Madison, Nc
via
SSH
Geek2
Fri Dec 5 10:55:11 2025
from
Euclid, Oh
via
Telnet
Cthulu
Thu Dec 4 03:12:21 2025
from
Area Code 604
via
Telnet
John F Kennedy
Thu Dec 4 01:39:08 2025
from
Crazyworldbbs.Com:2323
via
Telnet