Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: SCP help

From: Hamp Rutledge <hrutledge(at)guardnet.com>
Date: Thu May 29 2003 - 14:01:08 EDT


I haven't had much luck using passwords, however I have used ssh-keygen to generate a RSA (my preference) key for the user the script runs under. The public key is installed on the target system then I have found the following to work quite well.

scp -i ~/.ssh/<rsa private key name> <file to copy> target system:/<path>

A real world example is:

/usr/local/bin/scp -i /export/home/oper/.ssh/oper_rg_rsa $FRONT rgweb.registerguard.com:/web1/httpd/htdocs

The $FRONT is a shell variable that holds the filename of the file to copy. oper_rg_rsa is the private RSA key used to verify the users privilidges on the target system.

This works and the private key is never exposed since it is just used in the user validation process. Of course the script runs under the same user every time.

Hope this helps
At 09:51 AM 5/28/2003 -0500, you wrote:
>Hi I am trying to write a script using scp in which I would like to pass the

Hampel Rutledge
Information Systems Operations Manager

Do you need help?X

The Register-Guard
3500 Chad Drive
Eugene, OR 97408
(541) 485-1234 x 2532
e-mail: hrutledge@guardnet.com Received on Thu May 29 14:21:58 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:59 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library