Ubuntu 12.10 にアップグレードした後、SSH 経由でログインできない

Ubuntu 12.10 にアップグレードした後、SSH 経由でログインできない

AWS EC2にUbuntu 12.04LTSインスタンスがあり、以下の手順に従って12.10にアップグレードしました。https://help.ubuntu.com/community/QuantalUpgrades

アップグレード後、VM にアクセスできなくなりましたssh。キーが受け入れられずssh、パスワードも拒否されます。VM は実行中で、アクセス可能であり、SSH が開始されています。問題は認証部分にあるようです。

SSH が、その VM にアクセスする唯一の方法です。どのような選択肢がありますか?

ubuntu@alice:~$ ssh -v -i .ssh/sos.pem  [email protected]
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /home/ubuntu/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to www.hostname.com [37.37.37.37] port 22.
debug1: Connection established.
debug1: identity file .ssh/sos.pem type -1
debug1: identity file .ssh/sos.pem-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1
debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: RSA 33:33:33:33:33:33:33:33:33:33:33:33:33:33
debug1: Host '[www.hostname.com]:22' is known and matches the RSA host key.
debug1: Found key in /home/ubuntu/.ssh/known_hosts:12
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: .ssh/sos.pem
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
[email protected]'s password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.

答え1

パスワードは正しいですか?

そうでなければEC2サポートを試してみるといいかもしれませんシステム

答え2

サーバーの /var/log/auth.log を確認してください。sshd が接続を拒否した理由がわかるはずです。

答え3

さて、クライアント側でこのファイルをチェックしてください:/etc/ssh/sshd_config、そして、

RSAAuthentication yes
PubkeyAuthentication yes

次に、次の操作を実行します。

sudo grep 'sshd' /var/log/secure | grep 'Authentication refused' | tail -5

次のようなメッセージが表示されたら"Authentication refused: bad ownership or modes for directory"、そのディレクトリまたはそれらのディレクトリの権限を変更します。

sudo chmod 0755 directory

そしてもう一度試してください。

答え4

sshdの最新バージョンがインストールされていることを確認してください。すでに最新バージョンがインストールされている場合は、以下を実行してください。

$sudo apt-get remove --purge ssh

その後、ssh を再インストールします。

関連情報