我一直使用PuTTY和WinSCP SSH到EC2。我最近Commands > Open in PuTTY
在WinSCP中发现了该功能,但是它似乎不起作用。连接时出现此错误(腻子):
网络错误:连接被拒绝
这是PuTTY事件日志中的错误:
2018-05-23 22:40:11 Connecting to ::1 port 22
2018-05-23 22:40:11 We claim version: SSH-2.0-PuTTY_Release_0.70
2018-05-23 22:40:12 Failed to connect to ::1: Network error: Connection refused
2018-05-23 22:40:12 Connecting to 10.8.x.x port 22
2018-05-23 22:40:13 Failed to connect to 10.8.x.x: Network error: Connection refused
2018-05-23 22:40:13 Connecting to 192.168.x.x port 22
2018-05-23 22:40:14 Failed to connect to 192.168.56.1: Network error: Connection refused
2018-05-23 22:40:14 Connecting to 192.168.x.x port 22
2018-05-23 22:40:15 Failed to connect to 192.168.x.x: Network error: Connection refused
2018-05-23 22:40:15 Network error: Connection refused
(用xx部分编辑的IP地址)
显然问题在于它所连接的IP(第一行)
2018-05-23 22:40:11 Connecting to ::1 port 22
工作事件日志如下所示:
2018-05-23 22:44:01 Connecting to o.o.o.o port 22
2018-05-23 22:44:01 We claim version: SSH-2.0-PuTTY_Release_0.70
2018-05-23 22:44:01 Server version: SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
2018-05-23 22:44:01 Using SSH protocol version 2
2018-05-23 22:44:01 Doing ECDH key exchange with curve Curve25519 and hash SHA-256
2018-05-23 22:44:02 Server also has ecdsa-sha2-nistp256/ssh-rsa host keys, but we don't know any of them
2018-05-23 22:44:02 Host key fingerprint is:
2018-05-23 22:44:02 ssh-ed25519 256 <removed>
2018-05-23 22:44:02 Initialised AES-256 SDCTR client->server encryption
2018-05-23 22:44:02 Initialised HMAC-SHA-256 client->server MAC algorithm
2018-05-23 22:44:02 Initialised AES-256 SDCTR server->client encryption
2018-05-23 22:44:02 Initialised HMAC-SHA-256 server->client MAC algorithm
2018-05-23 22:44:02 Reading key file "<removed>"
2018-05-23 22:44:02 Pageant is running. Requesting keys.
2018-05-23 22:44:02 Pageant has 1 SSH-2 keys
2018-05-23 22:44:02 Configured key file not in Pageant
2018-05-23 22:44:02 Offered public key
2018-05-23 22:44:02 Offer of public key accepted
2018-05-23 22:44:02 Sent public key signature
2018-05-23 22:44:02 Access granted
2018-05-23 22:44:02 Opening session as main channel
2018-05-23 22:44:03 Opened main channel
2018-05-23 22:44:03 Allocated pty (ospeed 38400bps, ispeed 38400bps)
2018-05-23 22:44:03 Started a shell/command
凡o.o.o.o
在第1行表示EC2实例的公网IP。
知道为什么连接::1
来自WinSCP而不是正确的IP地址吗?
当我按住Ctrl+Shift并单击时,Open in PuTTY
这是剪贴板的内容:
"C:\Program Files\PuTTY\putty.exe" -load aws-ubuntu
aws-ubuntu
是WinSCP中的配置/站点的名称。