我试图从Ubuntu ssh并使用Windows中的Putty \ Filezilla连接到我从AWS Marketplace的AMI创建的EC2实例,但我总是收到以下错误(我已经尝试过root ,ec2_user,bitnami和ubuntu作为用户名):
OpenSSH_6.7p1 Ubuntu-5ubuntu1.3, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 54.232.231.17 [54.232.231.17] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file madcloset.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file madcloset.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Ubuntu-5ubuntu1.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr umac-64-etm@openssh.com none
debug1: kex: client->server aes128-ctr umac-64-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 16:9f:ca:89:b8:68:cb:0c:ed:94:82:e0:77:4b:6e:ae
debug1: Host '54.232.231.17' is known and matches the ECDSA host key.
debug1: Found key in /home/juliano/.ssh/known_hosts:5
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: Offering RSA public key: julianonunes@live.com
debug1: Authentications that can continue: publickey
debug1: Trying private key: madcloset.pem
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
我创建了一个新的密钥对,并在Windows上使用了Puttygen,但仍然是同样的错误。
为什么?
答案 0 :(得分:0)
Bitnami开发人员,
要连接到基于Bitnami的Amazon Web Services实例,您必须使用bitnami
作为用户名,并使用您在使用Amazon EC2控制面板启动服务器时选择或生成的私有SSH密钥。请注意,您需要使用选项-i
为SSH命令指定SSH密钥。例如,SSH命令看起来像:
ssh -i / path / to / your / ssh_key bitnami @ your_ec2_instance_dns_name
您需要指定SSH密钥,因为bitnami
用户默认情况下没有密码,也因为我们已禁用SSH连接的密码。如果您愿意,可以在连接后启用它。
另请注意,登录后,您可以使用sudo
实用程序在必要时通过运行命令sudo su
成为root用户。
希望它有所帮助,
的Gonzalo