Linux CentOS SSH到AWS EC2实例崩溃/冻结

Linux CentOS SSH到AWS EC2实例崩溃/冻结,linux,amazon-web-services,ssh,amazon-ec2,Linux,Amazon Web Services,Ssh,Amazon Ec2,我正在尝试连接到运行AmazonAMI的AWSEC2实例 我已下载我的安全组密钥对并设置了正确的权限 chmod 400 ~/Downloads/keyPairFile.pem 然后我尝试通过公共DNS地址连接到ssh ssh -v -i ~/Downloads/keyPairFile.pem ec2-user@ec2-ip.region.compute.amazonaws.com 我得到以下详细的输出 OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 20

我正在尝试连接到运行AmazonAMI的AWSEC2实例

我已下载我的安全组密钥对并设置了正确的权限

chmod 400 ~/Downloads/keyPairFile.pem
然后我尝试通过公共DNS地址连接到ssh

ssh -v -i ~/Downloads/keyPairFile.pem ec2-user@ec2-ip.region.compute.amazonaws.com
我得到以下详细的输出

OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to ec2-ip.region.compute.amazonaws.com [ip] port 22.
debug1: Connection established.
debug1: identity file ~/Downloads/keyPairFile.pem type -1
debug1: identity file ~/Downloads/keyPairFile.pem-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
debug1: match: OpenSSH_6.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
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 'ec2-ip.region.compute.amazonaws.com' is known and matches the RSA host key.
debug1: Found key in ~/.ssh/known_hosts:2
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: Trying private key: ~/Downloads/keyPairFile.pem
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env XMODIFIERS = @im=none
debug1: Sending env LANG = en_US.UTF-8

然而,我的Windows 7桌面上的Java客户端功能完美。

当webapp找不到您的pem文件时,这种情况似乎会发生。检查您的文件路径和语法,确保所有内容都是正确的。在我的mac电脑上,答案是使用前斜杠而不是后斜杠(如示例所示)。最终使用了:


/Users/david/Desktop/keypair.pem

您是否尝试从其他PC连接到此实例?您是否尝试使用密钥通过AWS的Java客户端连接到此实例?如上所述,我已经尝试了这两种方法,并且都挂起了。我也面临同样的问题。你能解决它吗?
MindTerm home: ~/.mindterm/
SSH Server/Alias: [ip here]
Connected to server running SSH-2.0-OpenSSH_6.2

Server's hostkey (ssh-dss) fingerprint:
openssh md5:  [openssh hash here]
bubblebabble: [bubblebabble here]