Re: SCP help
From: Hamp Rutledge (hrutledge_at_guardnet.com)
Date: 05/29/03
- Previous message: Jeff D: "Re: SCP help"
- In reply to: Thotapalli, Ravi: "SCP help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 29 May 2003 11:01:08 -0700 To: "Thotapalli, Ravi" <ravi.thotapalli@eds.com>, secureshell@securityfocus.com
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
>password to the script by means of standard input (via a file) could anyone
>let me know if you have tried this already and if it works or not. I have
>used the same with ftp and it works but for some reason with scp I am unable
>to do that.
>
>thanks
>Ravi Thotapalli
>Phone (415)-551-5655
>Mail ravi.thotapalli@eds.com
Hampel Rutledge
Information Systems Operations Manager
The Register-Guard
3500 Chad Drive
Eugene, OR 97408
(541) 485-1234 x 2532
e-mail: hrutledge@guardnet.com
- Previous message: Jeff D: "Re: SCP help"
- In reply to: Thotapalli, Ravi: "SCP help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|