TurboFTP Server can act as an SCP Server to provide SCP (Secure copy) service over the SSH2 layer. Because of the same underlying secure layer, SCP offers the same level of security as SFTP over SSH2. In terms of file transfer, SCP is technically faster because it requires no repetitive confirmation of data blocks like in SFTP. Also, SCP is ideal to be used in the script for batch file transfer, where it is more straightforward than SFTP.
# Copy the file "myfile.txt" from a remote host to the local host
$ SCP firstname.lastname@example.org:myfile.txt /some/local/directory
# Copy the file "myfile.txt" from the local host to a remote host
$ SCP myfile.txt email@example.com:/some/remote/directory/
# Copy the directory "dir1" from the local host to a remote host's directory "dir"
$ SCP -r dir1 firstname.lastname@example.org:/some/remote/dir
- If the destination is a remote directory (e.g. '
newdir' in the following examples), it should have an ending slash to eliminate ambiguity.
# not recommended
SCP -P 7222 *.jpg email@example.com:/newdir
SCP -P 7222 *.jpg firstname.lastname@example.org:/newdir/
# wrong, will return "illegal D msg 'D0755 0 testdir'" if 'newupdir' doesn't exist
$ SCP -P 7222 -r testdir/ email@example.com:/newupdir
# The following works, with local directory 'testdir' having an ending slash or not. # 'testdir' will be created at remote under 'newupdir'. However, 'newupdir' won't be created if it doesn't exist. # correct
$ SCP -P 7222 -r testdir/ firstname.lastname@example.org:/newupdir/
$ SCP -P 7222 -r testdir email@example.com:/newupdir/
- TurboFTP Server doesn't yet support regular expression wildcard.