Home / Security / Secure File Transfer from SSH

Secure File Transfer from SSH

SSH secure iconIf you are accustomed to working with a graphical interface, such as Windows or Mac OS, having to manage your server from the command line can be arduous, but it is sometimes necessary. In some situations, for example, you might need to send a file directly from the server without jeopardizing security.

Assuming you are already logged into your server via SSH, you can also use the secure shell to send files. The command that handles this is called SCP, which stands for Secure Copy. SCP encrypts the file and any passwords, unlike FTP or RCP.

Sending files only involves a single line of commands. For example, if you wanted to send a file called “database.sql” to your backup server at “mybackup.me”, you would enter the following:

scp database.sql username@mybackup.me:/home/username/sqlbackup

Replace “username” with your actual username on the backup server, and the path after the “:” should match the actual path on the backup server where you want the copied file stored.

After you finish, you do not even need to disconnect. The connection will only stay open as long as SCP is sending the file. For more advanced SCP tips, type “man scp” from the command line.

Image: Wikimedia Commons

Check Also

Uk data center

Professional Data Centres In The UK

A professional data centre is a location in which various pieces of hardware are located …