WinSCP和PuTTY集成无法正常工作


4

我一直使用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中的配置/站点的名称。

Answers:


1

当您在PuTTY中存储的会话与WinSCP中当前站点的名称匹配时,WinSCP将指示PuTTY使用该会话,而不是将WinSCP设置传递给PuTTY。

参见https://winscp.net/eng/docs/integration_putty#session_configuration

这就是您的情况(-load aws-ubuntu)。

看来您aws-ubuntu在PuTTY 中的会话未配置与WinSCP aws-ubuntu站点相同的会话。

aws-ubuntu在PuTTY中删除或修复会话。


@PimpJuiceIT我看不到这与这个问题有什么关系。如果您有问题,请发布新问题。
Martin Prikryl
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.