Uncategories

Secure Copy (scp)

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.

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