Quote:
Hi all, I was wondering if there was a way SCP in a script without using keys. Does anyone know the command to use so that I can reference the password within a script. I toyed with this which I found online "scp file user@host:/save/path password="password"/>". However I couldn't get that to work. Any help would be greatly appreciated. Thank you
[/b]
|
The only good option: USE KEYS.
If you really need passwords (but you don't want that!), you'll need something like 'expect' as a wrapper. scp itself does NOT support any kind of password argument.
You can also use thing like Perl with Net::SCP::Expect, but that also is clumsy.
An alternative could be sftp: Perl for exmple has a module Net::SFTP which support password-logins.
But: USE KEYS.
HTH,
Paul