version 1.228, 2021/08/09 23:49:31 |
version 1.229, 2021/08/09 23:56:36 |
|
|
* This is set to non-zero if remote-remote copy should be piped |
* This is set to non-zero if remote-remote copy should be piped |
* through this process. |
* through this process. |
*/ |
*/ |
int throughlocal = 0; |
int throughlocal = 1; |
|
|
/* Non-standard port to use for the ssh connection or -1. */ |
/* Non-standard port to use for the ssh connection or -1. */ |
int sshport = -1; |
int sshport = -1; |
|
|
|
|
fflag = Tflag = tflag = 0; |
fflag = Tflag = tflag = 0; |
while ((ch = getopt(argc, argv, |
while ((ch = getopt(argc, argv, |
"12346ABCTdfpqrtvD:F:J:M:P:S:c:i:l:o:")) != -1) { |
"12346ABCTdfpqRrtvD:F:J:M:P:S:c:i:l:o:")) != -1) { |
switch (ch) { |
switch (ch) { |
/* User-visible flags. */ |
/* User-visible flags. */ |
case '1': |
case '1': |
|
|
case '3': |
case '3': |
throughlocal = 1; |
throughlocal = 1; |
break; |
break; |
|
case 'R': |
|
throughlocal = 0; |
|
break; |
case 'o': |
case 'o': |
case 'c': |
case 'c': |
case 'i': |
case 'i': |
|
|
usage(void) |
usage(void) |
{ |
{ |
(void) fprintf(stderr, |
(void) fprintf(stderr, |
"usage: scp [-346ABCpqrTv] [-c cipher] [-D sftp_server_path] [-F ssh_config]\n" |
"usage: scp [-346ABCpqRrTv] [-c cipher] [-D sftp_server_path] [-F ssh_config]\n" |
" [-i identity_file] [-J destination] [-l limit] [-M scp|sftp]\n" |
" [-i identity_file] [-J destination] [-l limit] [-M scp|sftp]\n" |
" [-o ssh_option] [-P port] [-S program] source ... target\n"); |
" [-o ssh_option] [-P port] [-S program] source ... target\n"); |
exit(1); |
exit(1); |