I'm new to Linux so keep that in mind when offering advice.
I became over zealous and ran the command here:
http://www.shellhacks.com/en/HowTo-Create-USER-with-ROOT-Privileges-in-Linux
useradd -ou 0 -g 0 john
passwd john
now I try to connect the way I usually do:
ssh -i yok.pem root@staging.yok.com -vv
and I'm getting:
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to staging.yok.com [23.23.77.124] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file yok.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file yok.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
I luckily still have one connection to the server open. I checked my ~/.ssh folder and the files all have 600 permissions.
What do I need to do here? I'm stuck.
Best Answer
Wow okay well have you considered just removing the user?
As others have mentioned login as root over ssh is ill advised and so is having duplicate uid's of 0.