Sabtu, 22 Desember 2018

How to fix Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys

  Tidak ada komentar
Some day i got error How to fix Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys when try login to the server using public key, i checked the error log in secure log file and here are the result
Dec 23 12:03:06 esb sshd[28559]: Authentication refused: bad ownership or modes for file /home/wahid/.ssh/authorized_keys
Dec 23 12:03:06 esb sshd[28559]: Authentication refused: bad ownership or modes for file /home/wahid/.ssh/authorized_keys
Dec 23 12:10:48 esb sshd[29428]: Authentication refused: bad ownership or modes for file /home/wahid/.ssh/authorized_keys
Change the privileges mode of ssh folder and authorized_keys file 
[wahid@esb ~]$ chmod 700 .ssh/
[wahid@esb ~]$ chmod 600 .ssh/authorized_keys
[wahid@esb ~]$
Ssh login using public key successfully 
login as: wahid
Authenticating with public key "rsa-key-20181223" from agent
Last login: Sun Dec 23 12:25:38 2018 from 192.168.72.234
[wahid@esb ~]$ ls -aslht
total 40K
4.0K drwx------.  5 wahid wahid 4.0K Dec 23 12:24 .
4.0K drwx------.  2 wahid wahid 4.0K Dec 23 12:24 .ssh
4.0K -rw-------.  1 wahid wahid 3.2K Dec 23 12:24 .viminfo
4.0K -rw-------.  1 wahid wahid 1.1K Dec 23 12:18 .bash_history
4.0K drwxr-xr-x. 10 root  root  4.0K Jan 14  2018 ..
4.0K drwxr-xr-x.  4 wahid wahid 4.0K Jan 12  2016 .mozilla
4.0K -rw-r--r--.  1 wahid wahid   18 Jul  9  2013 .bash_logout
4.0K -rw-r--r--.  1 wahid wahid  176 Jul  9  2013 .bash_profile
4.0K -rw-r--r--.  1 wahid wahid  124 Jul  9  2013 .bashrc
4.0K drwxr-xr-x.  2 wahid wahid 4.0K Jul 14  2010 .gnome2
[wahid@esb ~]$



Tidak ada komentar :

Posting Komentar