OCI: Duplicated Account Causes SSH to Fail With the "Permission denied" Error
APPLIES TO:
Oracle Cloud Infrastructure
Linux x86-6
SYMPTOMS:
When connecting to an Oracle Linux system via SSH, the below error is received:
$ ssh opc@example.com opc@example.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic). $
CAUSE:
The opc
account is duplicated in the /etc/passwd
file:
bash# grep opc /etc/passwd opc:x:0:0:opc:/opc:/bin/bash opc:x:1000:1000:Oracle Public Cloud User:/home/opc:/bin/bash bash#
The above causes SSHd to fail with the below when executed in debug mode (via the /usr/sbin/sshd -d
executed on server-side):
debug1: temporarily_use_uid: 0/0 (e=0/0) debug1: trying public key file /opc/.ssh/authorized_keys debug1: Could not open authorized keys '/opc/.ssh/authorized_keys': No such file or directory debug1: restore_uid: 0/0
Tagged:
0