使用热点 Wi-Fi 时,我无法通过 SSH 进入我的 EC2 实例

使用热点 Wi-Fi 时,我无法通过 SSH 进入我的 EC2 实例

在我开始使用热点 Wi-Fi 而不是普通 Wi-Fi 之前,我从未遇到过这个问题。

connection closed by xx.xxx.xxx.xx当我尝试通过 SSH 进入我的 Amazon 实例时,总是会出现以下情况:

jeff@jeff-Inspiron-5749:~$ ssh -v -i /path/to/key.pem [email protected]
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /home/jeff/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 9.99.999.99 [9.99.999.99] port 22.
debug1: Connection established.
debug1: identity file /path/to/key.pem type -1
debug1: identity file /path/to/key.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.8
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.13
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.13 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr [email protected] none
debug1: kex: client->server aes128-ctr [email protected] none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Connection closed by 9.99.999.99

编辑:

我还尝试更改 EC2 的入站安全规则以接受所有 IP 地址:0.0.0.0/0,这有时会起作用,但只是偶尔。我怀疑这可能是我的热点 Wi-Fi 的连接/速度问题?但我可以很好地在 YouTube 上播放视频...

我目前已通过在亚马逊上选择“使用我的 IP”将我的热点 IP 地址列入白名单。

编辑2:

我切换回正常 WiFi,这样我就可以登录到我的 EC2 并查看 /var/log/auth.log 文件,这是我发现的内容:

AUG 20 08:05:01: session opened for user root by (uid=0)
AUG 20 08:05:01: session closed for user root 

在许多行中...总是以相同的时间。打开并立即关闭。

跟踪路由信息:

使用正常 wifi 进行跟踪路由:

jeff@jeff-Inspiron-5749:~$ traceroute 3.15.182.213
traceroute to 3.15.182.213 (3.15.182.213), 30 hops max, 60 byte packets
 1  192.168.1.1 (192.168.1.1)  0.957 ms  1.382 ms  1.380 ms
 2  * * *
 3  173-219-251-70.suddenlink.net (173.219.251.70)  28.725 ms  28.740 ms  29.351 ms
 4  173-219-243-78.suddenlink.net (173.219.243.78)  32.849 ms  33.736 ms  40.397 ms
 5  173-219-251-42.suddenlink.net (173.219.251.42)  40.376 ms  40.385 ms  43.927 ms
 6  sjo-b21-link.telia.net (213.248.71.92)  43.931 ms  27.817 ms  27.746 ms
 7  kanc-b1-link.telia.net (213.155.132.181)  56.957 ms  62.528 ms  62.489 ms
 8  chi-b22-link.telia.net (62.115.121.231)  74.532 ms  79.607 ms  79.564 ms
 9  a100-ic-320469-chi-b22.c.telia.net (213.248.76.189)  85.049 ms  85.025 ms  90.579 ms
10  52.95.63.36 (52.95.63.36)  93.491 ms 52.95.63.100 (52.95.63.100)  90.982 ms 52.95.63.84 (52.95.63.84)  69.568 ms
11  52.95.63.129 (52.95.63.129)  69.504 ms 52.95.63.81 (52.95.63.81)  67.446 ms 52.95.63.93 (52.95.63.93)  66.798 ms
12  * * *
13  54.239.43.213 (54.239.43.213)  101.916 ms 54.239.43.221 (54.239.43.221)  101.347 ms 54.239.43.213 (54.239.43.213)  93.177 ms
14  * * *
15  52.95.3.38 (52.95.3.38)  92.952 ms 52.95.2.150 (52.95.2.150)  96.277 ms 52.95.2.232 (52.95.2.232)  84.388 ms
16  52.95.2.219 (52.95.2.219)  87.294 ms 52.95.2.137 (52.95.2.137)  88.427 ms 52.95.2.163 (52.95.2.163)  88.596 ms
17  52.95.2.164 (52.95.2.164)  87.236 ms 52.95.2.106 (52.95.2.106)  95.621 ms 52.95.2.252 (52.95.2.252)  99.941 ms
18  52.95.2.171 (52.95.2.171)  85.164 ms 52.95.2.199 (52.95.2.199)  85.299 ms 52.95.2.87 (52.95.2.87)  95.134 ms
19  52.95.1.6 (52.95.1.6)  91.705 ms  91.658 ms 52.95.3.132 (52.95.3.132)  88.059 ms
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *
jeff@jeff-Inspiron-5749:~$

使用热点 wifi 进行跟踪路由:

jeff@jeff-Inspiron-5749:~$ traceroute 3.15.182.213
traceroute to 3.15.182.213 (3.15.182.213), 30 hops max, 60 byte packets
 1  192.168.43.1 (192.168.43.1)  104.447 ms  104.446 ms  104.443 ms
 2  249.sub-66-174-31.myvzw.com (66.174.31.249)  168.149 ms  177.345 ms  177.575 ms
 3  * * *
 4  * * *
 5  * * *
 6  171.sub-69-83-164.myvzw.com (69.83.164.171)  177.511 ms  33.417 ms  33.247 ms
 7  3.sub-69-83-164.myvzw.com (69.83.164.3)  33.845 ms  126.625 ms  126.604 ms
 8  232.sub-69-83-160.myvzw.com (69.83.160.232)  126.600 ms  126.577 ms  126.553 ms
 9  122.sub-69-82-83.myvzw.com (69.82.83.122)  126.556 ms  126.551 ms  44.159 ms
10  137.sub-66-174-29.myvzw.com (66.174.29.137)  50.315 ms  50.333 ms  50.723 ms
11  209.116.153.13 (209.116.153.13)  51.129 ms  51.102 ms  51.109 ms
12  207.88.14.197.ptr.us.xo.net (207.88.14.197)  74.258 ms  77.847 ms  77.731 ms
13  52.95.217.244 (52.95.217.244)  77.306 ms 52.95.217.130 (52.95.217.130)  77.072 ms  76.966 ms
14  176.32.125.212 (176.32.125.212)  77.031 ms 176.32.125.164 (176.32.125.164)  74.228 ms 176.32.125.152 (176.32.125.152)  74.386 ms
15  176.32.125.157 (176.32.125.157)  79.744 ms 176.32.125.181 (176.32.125.181)  79.703 ms 176.32.125.203 (176.32.125.203)  79.466 ms
16  * * *
17  52.93.129.119 (52.93.129.119)  106.968 ms 52.93.129.109 (52.93.129.109)  109.956 ms 52.93.129.119 (52.93.129.119)  109.554 ms
18  * * *
19  52.95.2.148 (52.95.2.148)  112.365 ms 52.95.2.30 (52.95.2.30)  104.080 ms 52.95.2.148 (52.95.2.148)  108.191 ms
20  52.95.2.163 (52.95.2.163)  113.684 ms 52.95.2.195 (52.95.2.195)  104.267 ms 52.95.2.111 (52.95.2.111)  102.228 ms
21  52.95.2.168 (52.95.2.168)  104.889 ms 52.95.2.190 (52.95.2.190)  110.505 ms 52.95.2.164 (52.95.2.164)  107.502 ms
22  52.95.3.27 (52.95.3.27)  119.008 ms 52.95.2.199 (52.95.2.199)  112.348 ms 52.95.2.255 (52.95.2.255)  106.043 ms
23  52.95.3.132 (52.95.3.132)  109.461 ms  110.252 ms 52.95.1.2 (52.95.1.2)  109.603 ms
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *
jeff@jeff-Inspiron-5749:~$ 

相关内容