我可以使用以下命令连接到 ec2 实例,但今天我无法使用它进行连接。
ssh -i abcKey.pem [email protected] /cdn-cgi/l/email-protection -v
以下是详细内容。我已经在 EC2 中打开了 SSH 端口(直到昨天我都可以连接到它)
OpenSSH_6.6.1, 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 ec2-x-x-x-x.ap-southeast-1.compute.amazonaws.com [x-x-x-x] port 22.
debug1: Connection established.
debug1: identity file abcKey.pem type -1
debug1: identity file abcKey.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
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
一个可能的问题是安全组限制太严格,您无法连接。要解决此问题:
- 转到 EC2 管理控制台
- 单击安全组(位于左侧边栏中)。
- 选择您的 EC2 实例的安全组。
- 在底部框中,单击“入站”选项卡。
- 应该有一个 SSH 规则,确保可以从任何地方访问它并且它位于正确的端口(SSH 为 22)。另外,请确保协议是 TCP。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)