Scp,sftp through a tunnel

Learn how to copy files through a tunnel using scp or sftp


Copying files to a remote system over scp or sftp requires an SSH server running on the remote side. On almost all Linux systems SSH is installed and active.

Create a tunnel for SSH access to the remote server. The tunnel will end on a random port on your rport server. Remember the port number.

Using scp or rsync

To copy a file to the remote system over the tunnel via scp use


For example:

scp -P 22708 /etc/hosts

Doing the same over rsync

rsync -e "ssh -p 22708" /etc/hosts

Using Filezilla

  • Open the site manager of Filezilla.

  • Create a new site using the "SFTP- SSH File Transfer Protocol.

  • Enter the name of the rport server as "Host".

  • Enter the port of the tunnel as port for the Filezilla connection

Last updated