冗長ルートユーザーを作成しようとしましたが、サーバーに接続できなくなりました

冗長ルートユーザーを作成しようとしましたが、サーバーに接続できなくなりました

私はLinuxに初めて接するので、アドバイスをするときにこの点を念頭に置いてください。

私はとても熱心だったので、ここでコマンドを実行しました。

http://www.shellhacks.com/en/HowTo-Create-USER-with-ROOT-Privileges-in-Linux

useradd -ou 0 -g 0 john
passwd john

これで、一般的な方法で接続を試みます。

ssh -i yok.pem [email protected] -vv

私は得る:

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

幸いなことに、まだサーバーに接続されています。 ~/.sshフォルダを確認しましたが、ファイルには600の権限があります。

ここで何をすべきですか?ついています。

ベストアンサー1

わ、わかりました。ユーザーの削除を検討しましたか?

userdel john

他の人が述べたように、sshを介してrootとしてログインすることは、重複したuidが0なので賢明ではありません。

おすすめ記事