Не могу войти через ssh после обновления до Ubuntu 12.10

Не могу войти через ssh после обновления до Ubuntu 12.10

У меня есть экземпляр Ubuntu 12.04LTS на AWS EC2, и я обновил его до 12.10, следуя инструкциям на сайтеhttps://help.ubuntu.com/community/QuantalUpgrades.

После обновления я больше не могу sshвойти в свою виртуальную машину. Она не принимает мой sshключ, и мой пароль также отклоняется. Виртуальная машина работает, доступна и SSH запущен. Проблема, похоже, в части аутентификации.

SSH был единственным способом для меня получить доступ к этой виртуальной машине. Какие у меня есть варианты?

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.

Связанный контент