[PATCH] Add scp -1 and -2 options to OpenSSH-3.0.2p1

Dan Kaminsky dan at doxpara.com
Mon Jan 28 07:49:04 EST 2002


> case '1':
> case '2':
> addargs(&args, "-Protocol=%c", ch)
> break;
>
> Still doubtful it will be accepted since -o provides such abilities. And
> is even stated in the scp documentation as an exmaple of the -o usage.

SCP is conceptually a special case execution of SSH that copies files using
the RCP syntax.  Ideally, it should support the subset of options in SSH
still relevant to file copying.  By my count, they are:

===
  -l user     Log in using this user name.
  -F config   Config file (default: ~/.ssh/config).
  -i file     Identity for public key authentication (default:
~/.ssh/identity)
  -v          Verbose; display verbose debugging messages.
              Multiple -v increases verbosity.
  -V          Display version number only.
  -P          Don't allocate a privileged port.
  -q          Quiet; don't display any warning messages.
  -f          Fork into background after authentication.
  -c cipher   Select encryption algorithm
  -m macs     Specify MAC algorithms for protocol version 2.
  -p port     Connect to this port.  Server must be on the same port.
  -C          Enable compression.
  -1          Force protocol version 1.
  -2          Force protocol version 2.
  -4          Use IPv4 only.
  -6          Use IPv6 only.
  -o 'option' Process the option as if it was read from a configuration
file.
  -b addr     Local IP address.
===

Status on these:

-l: unsupported
-F config:  supported
-i file: supported
-v: supported
-V: supported
-P: unsupported; overloaded for -p conflict, may reference historical port
shifting command
-q: supported
-f: unsupported (but kinda cool -- copy in background?)
-c: supported
-m: unsupported
-p: overloaded onto -P due to "preserve times" conflict from historical
context
-C: supported
-1: unsupported
-2: unsupported
-4: supported
-6: supported
-o option: supported
-b addr: unsupported

For all command line options, we've already determined that these were all
*such* important parameters to ssh that they deserve to be triggerable using
quick mnemonics and documented in the short list of SSH options.  So the
decision has already been made to go above and beyond -o syntax; the
question now is whether that decision should continue onto SCP.

I think, given the fact that we support the majority of relevant options
from SSH at present, we should try to be consistent and support all
arguments that have a relevant context and don't conflict with existing
command line options.  That would mean adding support for:

-l
-m
-1
-2
-b addr

and if someone is a bit masochistic,

-f

It's just a matter of consistency -- though, to be honest, since protocol
declaration impacts security pretty directly, both in terms of communication
privacy and authentication methods, it's really hard to claim -1/-2 aren't
completely appropriate for SCP regardless of "Well, it works in SSH".

--Dan





More information about the openssh-unix-dev mailing list