Re: SCP help

From: Hamp Rutledge (hrutledge_at_guardnet.com)
Date: 05/29/03

  • Next message: Chris Macneill: "RE: SecureID in place of passphrase"
    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


  • Next message: Chris Macneill: "RE: SecureID in place of passphrase"

    Relevant Pages

    • Re: Automating FTP transfers
      ... the passwords is added to the script just before it ... * To join/leave the list, search archives, change list settings, * ... Authorised and regulated by the Financial Services Authority. ...
      (comp.sys.hp.mpe)
    • RE: Local Admins
      ... Write a Perl script to handle it. ... change the passwords of local admins, ... when any new member is added to one of these groups. ... when someone in our group questioned whether we'd be sending passwords ...
      (Focus-Microsoft)
    • Re: Send notification before PWDs expire
      ... built-in notification for PWDs expiration, ... interested in something like “Lots of people have taken the script and run ... make this deployment successful in a production environment. ... Finding the expiring passwords is not that big of a deal. ...
      (microsoft.public.windows.server.active_directory)
    • Re: Problem running a script
      ... I thought of that but when I imported the users I assigned them all passwords ... ' UserAccountControl .vbs ... ' The heart of this script - Enable users ... how do I determine which part of domain policy is stopping ...
      (microsoft.public.windows.server.active_directory)
    • Re: Complex Password Scripting
      ... Greg wrote: ... I have the script for modifying all passwords in the OU to the same password. ... 'objUser.SetPassword strPass ...
      (microsoft.public.windows.server.scripting)