Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jan 2007 16:05:22 +0000
From:      RW <fbsd06@mlists.homeunix.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Password on command line with SCP
Message-ID:  <20070120160522.2a429cec@gumby.homeunix.com>
In-Reply-To: <009b01c73c5d$a1d11dd0$0300020a@mickey>
References:  <009b01c73c5d$a1d11dd0$0300020a@mickey>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 19 Jan 2007 22:38:44 -0800
"Don O'Neil" <don@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? 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070120160522.2a429cec>