About a year ago, I was forced to move away from using FTP and start using SCP (secure cp) to transfer files between our Linux servers. SCP is available on other UNIX systems and easy enough to use. Problem is I don’t use it often enough and forget the syntax when I need it.
Syntax to copy the file “mike.txt” from a remote host to the local host:
# scp username@remotehost_name:/path/mike.txt /local_dir
Example of copying file to current directory location:
# scp email@example.com:/d01/dbbackup/jiradb.bkp .
The authenticity of host ‘srvr02.domain.com (xxx.xx.xxx.xx)’ can’t be established.
RSA key fingerprint is <hexadecimal_output>.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘srvr02.domain.com’ (RSA) to the list of known hosts.
jiradb.bkp 100% 51MB 1.8MB/s 00:28
WinSCP is an open source SFTP client for Windows.
Additional SCP syntax information found here.
SCP automation tip from Santhosh Tirunahari’s blog Think Beyond Technology.