ssh conection>权限被拒绝(publickey)。 Ubuntu 12.04 EC2

时间:2014-03-05 17:54:13

标签: amazon-web-services ssh amazon-ec2 key rsa

我在1小时前使用我的EC2实例,我使用scp将我的网页上传到我的服务器,一切都很好。我用exit命令关闭了连接,现在我尝试使用与以前相同的命令登录,我得到了这个:

$ ssh -v -i /cygdrive/c/tsearch.pem ubuntu@tsearch.com.mx
OpenSSH_6.1p1, OpenSSL 1.0.1c 10 May 2012
debug1: Connecting to tsearch.com.mx [54.201.232.244] port 22.
debug1: Connection established.
debug1: identity file /cygdrive/c/tsearch.pem type -1
debug1: identity file /cygdrive/c/tsearch.pem-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1.1
debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1.1 pat OpenSSH_5*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.1
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: ECDSA 3f:d4:cb:c0:db:7b:49:5e:0a:dc:1b:ec:4f:23:14:c3
debug1: Host 'tsearch.com.mx' is known and matches the ECDSA host key.
debug1: Found key in /home/Fernando/.ssh/known_hosts:6
debug1: ssh_ecdsa_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
debug1: Next authentication method: publickey
debug1: Trying private key: /cygdrive/c/tsearch.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). 

我在网上搜索过,我找到了不同的答案,但没有一个有效(我不想删除我的亚马逊实例)。有什么想法吗?

1 个答案:

答案 0 :(得分:1)

最糟糕的情况是恢复实例中的数据。您可以从实例创建AMI,而无需重新启动。然后使用刚刚创建的AMI重新启动另一个实例。稍后,您可以更改DNS(或弹性IP)以指向新实例。

Create AMI