Password on command line with SCP

RW fbsd06 at mlists.homeunix.com
Sat Jan 20 16:05:31 UTC 2007


On Fri, 19 Jan 2007 22:38:44 -0800
"Don O'Neil" <don at lizardhill.com> wrote:

> 
> Is there any way to pass the password for an SCP command via the
> command line as a switch? I'd like to embed SCP in a script and pass
> the password once through a command line input from the master
> script... By defauly any time I use the -B mode it says passwords are
> required, and without -B it asks for the password after the command
> starts to execute.

Can you not just use:

   <username>:<password>@<host>

in place of the hostname? 


More information about the freebsd-questions mailing list