Re: Password on command line with SCP
On Fri, 19 Jan 2007 22:38:44 -0800 Don O'Neil [EMAIL PROTECTED] 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? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Password on command line with SCP
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. Thanks! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Password on command line with SCP
Don O'Neil 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. Thanks! ___ The only way I know of is to use keys for your authentication. You then can use 'scp -B -i somekeyfile file1 file2 ... example.com:.' Hope that helps. Cheers, Jeff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Password on command line with SCP
In the last episode (Jan 20), Jeff Royle said: Don O'Neil 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. The only way I know of is to use keys for your authentication. You then can use 'scp -B -i somekeyfile file1 file2 ... example.com:.' You can also use ports/lang/expect to script entering the password, but it's more fragile than using keys. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]