ftp over ssh

John Nielsen lists at jnielsen.net
Wed Nov 8 19:26:10 UTC 2006


On Wednesday 08 November 2006 14:12, John Nielsen wrote:
> On Wednesday 08 November 2006 04:45, Gorobets Igor wrote:
> > Hello. How correctly to adjust this miracle? :-)
>
> Assuming you have a server that is running sshd (on all interfaces) and
> ftpd (only on the loopback interface):
>
> ftpclient# ssh -fnN -l 20:localhost:20 -L 21:localhost:21 user at ftpserver
> ftpclient# ftp localhost
> ftp> passive

Typo above, -l should be -L.

Also, it turns out this doesn't work beyond getting logged in without also 
specifying a specific range of "passive ports" for the ftp server to use and 
forwarding those through ssh as well.

So as others have said, you're probably better off using sftp and/or scp, or 
setting up a true VPN if you're tied to traditional FTP for some reason.

JN


More information about the freebsd-questions mailing list