Exchange Files with SCP Server using Linux/BSD SCP command

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.

Turbo FTP Server can run as an SCP Server for Windows while supporting the exact syntax of Linux/Unix SCP command with some subtle differences.

For example:

# Copy the file "myfile.txt" from a remote host to the local host
$ SCP joe@remotehost.com:myfile.txt /some/local/directory

# Copy the file "myfile.txt" from the local host to a remote host
$ SCP myfile.txt joe@remotehost.com:/some/remote/directory/

# Copy the directory "dir1" from the local host to a remote host's directory "dir"
$ SCP -r dir1 joe@remotehost.com:/some/remote/dir

Subtle differences of SCP syntax for TurboFTP SCP Server vs Linux/BSD:

  • 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 joe@remotehost.com:/newdir
    # correct
    SCP -P 7222 *.jpg joe@remotehost.com:/newdir/
    # wrong, will return "illegal D msg 'D0755 0 testdir'" if 'newupdir' doesn't exist
    $ SCP -P 7222 -r testdir/ joe@remotehost.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/ joe@remotehost.com:/newupdir/
    $ SCP -P 7222 -r testdir joe@remotehost.com:/newupdir/
  • TurboFTP Server doesn't yet support regular expression wildcard.
We use cookies to maintain login sessions, analytics and to improve your experience on our website. By continuing to use our site, you accept our use of cookies, and Privacy Policy.
Ok