PuTTY + FileZillaPortable FTP Tunnel 設定

Tools

Win7 + PuTTY + FileZillaPortable

Situation

目標: (A) 192.168.10.1:22

跳板: (B) 192.168.1.1:22

Need to ftp to (A) but can only connect (A) through (B)

之前我只知道先Login到B→再Login到A→使用scp將檔案下載到B後→再ftp到B下載檔案.

今天學會了新的一招, Brilliant!

Solution

(localhost:5555→192.168.1.1:22→192.168.10.1:22)

Step 1. Open PuTTY→Session→Create a session: Host Name: 192.168.1.1, Port: 22 (跳板機)→Save

Step 2. Session→Load→(Step 1 created session)→SSH→Tunnels→Add Source port: 5555 (any unused local port), 192.168.10.1:22 (目標機)→Add (don’t forget)→回到Session→Save(don’t forget)

Step 3. Session→Click on Step 1 created session→Open→Login user/pwd (B 的 User/Pwd)

Step 4. Open FileZillaPortable→Site Manager→New Site→Host: localhost, Port: 5555, Protocol: SFTP, Logon Type: Normal, A 的 User/Pwd→Connect

此時就可經由Tunnel連接到目標機, 直接下載檔案了

在這當中, PuTTY的連線不可斷, 否則Tunnel就斷了 (Must open the PuTTY connection and leave it until you finish the rest of the work…)

Reference

利用ssh-tunnel連線至內部網路

http://realprogrammers.com/how_to/set_up_an_ssh_tunnel_with_putty.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s