OCI- unable to SSH node with error Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
in Linux
Applies to:
Oracle Cloud Infrastructure
Linux OS
Symptoms:
[root@xxxxxx ~]# ssh 172.X.X.X.X Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Secure log :
sshd[9739]: Authentication refused: bad ownership or modes for directory /root
sshd[9921]: Authentication refused: bad ownership or modes for directory /root
sshd[10295]: Authentication refused: bad ownership or modes for directory /root
sshd[10384]: Authentication refused: bad ownership or modes for directory /root
Cause
$ ls -ld /root drwxrwxrwx. 3 opc root 124 Feb 3 16:23 /root
Ownership and permission of /root is wrong.
Solution
Launch a Cloud Shell connection:
Boot the instance into maintenance mode:
Troubleshooting Instances Using Instance Console Connections
Remount the root filesystem with Read-Write permission:
Tagged:
0