2010-04-16 112 views
0

驗證我們的Ubuntu EC2實例之前一直運行良好。突然之間,關鍵是被拒絕。當我們使用密鑰對創建一個新實例時,我們能夠完美地連接到實例,所以它似乎是現有實例的問題。 22號港口已開放。亞馬遜EC2 RSA密鑰已停止驗證 - 許可被拒絕(公鑰)

關於從配置的角度來看待什麼的建議,以便我們解決這個問題?關於我們如何進入箱子的任何想法?

這裏是SSH調試輸出。有什麼明顯的錯誤嗎?

非常感謝!

$ ssh -v -i ~/zzz.pem [email protected]###.###.###.### 
OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009 
debug1: Reading configuration data /etc/ssh_config 
debug1: Connecting to ###.###.###.### [###.###.###.###] port 22. 
debug1: Connection established. 
debug1: identity file zzz.pem type -1 
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-6ubuntu2 
debug1: match: OpenSSH_5.1p1 Debian-6ubuntu2 pat OpenSSH* 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_5.2 
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: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP 
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY 
debug1: Host '###.###.###.###' is known and matches the RSA host key. 
debug1: Found key in /zzz/.ssh/known_hosts:18 
debug1: ssh_rsa_verify: signature correct 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug1: SSH2_MSG_NEWKEYS received 
debug1: SSH2_MSG_SERVICE_REQUEST sent 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug1: Authentications that can continue: publickey 
debug1: Next authentication method: publickey 
debug1: Offering public key: /zzz/.ssh/id_rsa 
debug1: Authentications that can continue: publickey 
debug1: Offering public key: zzz.txt 
debug1: Authentications that can continue: publickey 
debug1: Trying private key: zzz.pem 
debug1: read PEM private key done: type RSA 
debug1: Authentications that can continue: publickey 
debug1: No more authentication methods to try. 
Permission denied (publickey). 
+0

如果機器沒有其他用戶,那麼如何才能我們解決了這個問題? – 2011-01-13 14:56:49

+0

我有同樣的問題。 您能否解釋更多細節並指定如何解決問題 非常感謝 – 2011-01-13 14:57:02

+0

這是authorized_keys的一個很好的參考 - http://www.eng.cam.ac.uk/help/jpmg/ssh/authorized_keys_howto .html - 如果我記得,我們基本上找到了一個可以訪問並且能夠修復authorized_keys文件的用戶。 – shedd 2011-01-13 14:57:02

回答

1

我們知道這裏出了什麼問題。盒子上的用戶覆蓋了主〜/ .ssh/authorized_keys - 他能夠登錄並檢查該文件並將主.pem密鑰返回。

+2

用戶_is_敵人。總是。 – 2010-04-16 15:56:57