ssh root@localhostが悪い考えであることを知っています...わかりました。
しかし、なぜ機能しないのですかssh root@localhost
?
次のような場合に備えて、ルートパスワードも変更しました。
> sudo -s
> passwd
しかし、これを行うとssh root@localhost
、
root@localhost's password
:[パスワードを入力してください]
Permission denied, please try again.
何を探すべきかわからないので、ssh -vを試しましたが、最後の数行は次のようになります。
...
debug1: Offering RSA public key: /home/myName/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/myName/.ssh/id_dsa
debug1: Trying private key: /home/myName/.ssh/id_abcde
debug1: Trying private key: /home/myName/.ssh/id_ed123456
debug1: Next authentication method: password
root@localhost's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
root@localhost's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
root@localhost's password:
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
Permission denied (publickey,password).
/etc/ssh/sshd_config
ChallengeResponseAuthentication no
PermitRootLogin without-password
ベストアンサー1
問題は次のようになります。
PermitRootLogin without-password
sshd_configによるとマニュアルページ:
ルートログインを許可
ルートがssh(1)を使用してログインできるかどうかを指定します。パラメーターは、「yes」、「without-password」、「forced-commands-only」、または「no」でなければなりません。デフォルトは「はい」です。
このオプションを「パスワードなし」に設定すると、パスワード認証が使用されます。障害のあるルートのため。
このwithout-password
設定は、主に公開鍵(in ~/.ssh/authorized_keys
)を使用してログインするために使用されます。