It is possible to automate scp command declaring the password? for example, in scp -p -r pippo@10.10.1.100:/home/* /backup/pippo/ can I add the password in the row parameter how to schedule the scp? -- Calogero Bonasia http://www.linuxteam.it/
No you can't. But you can use ssh-keygen to generate a private/public key. Install the public key to the machine you are copying to and you're done. -Stathis On Wednesday 16 November 2005 17:12, Kalos Bonasia wrote:
It is possible to automate scp command declaring the password?
for example, in scp -p -r pippo@10.10.1.100:/home/* /backup/pippo/ can I add the password in the row parameter how to schedule the scp?
-- Calogero Bonasia http://www.linuxteam.it/
On Wednesday 16 November 2005 15:08, rouvas wrote:
No you can't. But you can use ssh-keygen to generate a private/public key. Install the public key to the machine you are copying to and you're done.
-Stathis
Just in case Stathis comment was not clear... You can setup SCP to work without asking for passwords, while still be just as safe (or safer, depending on who you ask.) Stathis comment describes how to do it... Jerry
On Thu, 17 Nov 2005 02:12, Kalos Bonasia wrote:
It is possible to automate scp command declaring the password?
for example, in scp -p -r pippo@10.10.1.100:/home/* /backup/pippo/ can I add the password in the row parameter how to schedule the scp?
The only way of doing this is using it in a expect script. You will find expect in the distribution. There is also autoexpect which can be used to generate a script. The main problem with this method is having a password embedded in script for everyone to see. See man expect The only other way is to use private/public keys using ssh-keygen. With this you do away for the need of a password and is far more secure. -- Regards, Graham Smith
On Wed, 2005-11-16 at 16:12 +0100, Kalos Bonasia wrote:
It is possible to automate scp command declaring the password?
for example, in scp -p -r pippo@10.10.1.100:/home/* /backup/pippo/ can I add the password in the row parameter how to schedule the scp?
Not directly but you can use scp with a programming language called expect. Or use a private/public key to avoid being prompted for a password. -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998
participants (5)
-
Graham Smith
-
Jerry Westrick
-
Kalos Bonasia
-
Ken Schneider
-
rouvas