Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scp in a script

Status
Not open for further replies.

crsdev

Programmer
Sep 29, 2006
96
US
Hello sun lovers :)
when i do
$scp -r XXX usr@servername:path...
it asks for password
how can i do this in a script so that it doesn't ask for any password.

Thanks and sorry for simple question
 
Load the ssh public key for usr in ~usr/.ssh/authorized_keys.
 
depends on the version of your ssh, some versions store the key in a separate file and you have to refere to that in a configfile. OpenSSH works with ~/.ssh/authorized_key file.

Best Regards, Franz
--
UNIX System Manager from Munich, Germany
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top