Ftp over ssh tunnel

Filed under: tinkering — jaydublu @ 6:20 pm

This isn’t radical, but it tripped me up for half an hour…

SSH tunneling is a great easy way of remotely accessing a network if you’ve access to an SSH account within it - using something like PuTTY you set up whichever ports you want access to and they magically appear locally.

But ftp is a bit trickier - the protocol needs two ports - 21 and another one. I couldn’t figure out how to configure tunnels in PuTTY to let the second port through, even using PASV connections.

But then I twigged all the references to SCP and SFTP which didn’t seem relevant as I wanted to reach a different remote machine to the one I was SSH’d to - tunnel port 22 to the machine you want to reach using PuTTY and then with the tunnel open you can use something like PSFTP to SFTP to the remote machine.

Make sense?