scp.py icon indicating copy to clipboard operation
scp.py copied to clipboard

add support when both source and target are from remote locations (not necessary the same server)

Open evan0greenup opened this issue 1 year ago • 0 comments

Consider the following output from man scp:

SCP(1)                    BSD General Commands Manual                   SCP(1)

NAME
     scp — OpenSSH secure file copy

SYNOPSIS
     scp [-346ABCOpqRrsTv] [-c cipher] [-D sftp_server_path] [-F ssh_config]
         [-i identity_file] [-J destination] [-l limit] [-o ssh_option]
         [-P port] [-S program] [-X sftp_option] source ... target

DESCRIPTION
     scp copies files between hosts on a network.

     scp uses the SFTP protocol over a ssh(1) connection for data transfer,
     and uses the same authentication and provides the same security as a lo‐
     gin session.

     scp will ask for passwords or passphrases if they are needed for authen‐
     tication.

     The source and target may be specified as a local pathname, a remote host
     with optional path in the form [user@]host:[path], or a URI in the form
     scp://[user@]host[:port][/path].  Local file names can be made explicit
     using absolute or relative pathnames to avoid scp treating file names
     containing ‘:’ as host specifiers.

     When copying between two remote hosts, if the URI format is used, a port
     cannot be specified on the target if the -R option is used.

     The options are as follows:

     -3      Copies between two remote hosts are transferred through the local
             host.  Without this option the data is copied directly between
             the two remote hosts.  Note that, when using the legacy SCP pro‐
             tocol (via the -O flag), this option selects batch mode for the
             second host as scp cannot ask for passwords or passphrases for
             both hosts.  This mode is the default.

It means that scp support situation when both source and target are from remote locations.

I hope this project can add support for such situation.

evan0greenup avatar Jul 07 '23 05:07 evan0greenup