Using WinSCP to grab a file through a tunnel [closed]

早过忘川 提交于 2019-12-06 05:38:06

Contrary to Andrey's answer: If you need to connect through a tunnel for an SSH terminal session, you need to connect through the tunnel with WinSCP for an SFTP session too, as the SFTP uses the SSH underneath. There's no difference.

To setup a connection through a tunnel in WinSCP:

  • first set up a session as if you were connecting directly, i.e. py-01
  • click the Advanced button to open the Advanced Site Settings dialog
  • there go to the Connection > Tunnel page
  • check Connect through SSH tunnel
  • in the Host name specify a host to tunnel through, i.e. university.edu
  • in the User name specify an account for the tunnel host

Note that tunnel port is autoselected, so you do not specify it (2200) anywhere.

For detais, see:
https://winscp.net/eng/docs/ui_login_tunnel


If you have an SSH tunnel setup already (using the first command from your question, if it is run on Windows using Cygwin), you can connect to the existing external tunnel with WinSCP:

  • the Host name localhost
  • the Port number 2200

You can also do it the other way around: Explicitly specify the Local tunnel port number in WinSCP, and reuse the WinSCP tunnel also for an SSH terminal client.

Generally, a tunnel is not required for WinSCP. You can connect to the remote Linux machine via standard ssh port 22.

However, if you still need the tunnel, there is a guide: http://winscp.net/eng/docs/ui_login_tunnel.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!