Another important function of SSH is allowing secure file transfer using SCP and SFTP.

Just as all modern Unix-like systems have an SSH client, they also have SCP and SFTP clients. To copy a file from your computer to another computer with ssh, go to a command-line and type:

scp <file> <username>@<IP address or hostname>:<Destination>

Sample:

scp -r /var/www/html/ root@10.10.10.10:/home/ubuntu/

The -r (recursive) option means to copy the whole folder and any sub-folders.