parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use scp using parallel by tyoing password only once


From: Thomas Jost
Subject: Re: How to use scp using parallel by tyoing password only once
Date: Mon, 02 May 2011 10:31:53 +0200
User-agent: Notmuch/0.5-156-g539f505 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-unknown-linux-gnu)

On Mon, 2 May 2011 10:12:28 +0200, Hans Schou <chlor@schou.dk> wrote:
> 2011/5/1 Shantanu Unknown <shantanu9847@hotmail.com>:
> > Hi,
> > Unfortunately nowadays passwordless ssh (using ssh-keygen etc) is no longer
> > recommended and we would like to
> > enter passwords. (also assume we don't have su access)
> > shantanu
> 
> There are 2 situations where you can be asked for a secret word:
>   1. When you 'ssh example.com' it ask 'joe@example.com's password:'
>   2. When you have a "pass-phrase" on your ~/.ssh/id_rsa it ask 'Enter
> passphrase for /home/joe/.ssh/id_rsa'
> 
> It sounds like you have not seen situation 2 as you only write about
> "password" and not "passphrase". It think it would be useful for you
> to check it out.

If you still want to enter a password (when not using a public key) or a
passphrase (when using a public key), you have 2 solutions:

1. use ssh-agent (or "gpg-agent --enable-ssh-support"). I don't know
   much about these, but AFAIK they can cache your passphrase for a
   while so you don't have to type it again.

2. SSH master/slaves connection. When you ssh into a host for the first
   time with "ssh -M", your ssh client turns into a daemon that will be
   used by subsequent ssh/scp instances to connect to that host. Since
   it will reuse the same connection, it won't need to ask for the
   password/passphrase again.
   Here is a snippet of my ~/.ssh/config that allows to do that
   automagically:
       Host *
           ControlMaster       auto
           ControlPath         /tmp/ssh-schnouki-%r@%h:%p
           ControlPersist      15m
   This way, I just have to type "ssh" and a master connection is
   opened and is closed 15 minutes after the last slave disconnects.
   "ControlPersist" requires a fairly recent version of OpenSSH; with
   older versions, the "master" ssh won't exit unless you close it
   manually, shutting down all "slave" connections too. So if you have
   one of these older verions, you should first ssh your target and
   then run "parallel scp ..." in another terminal.
   More details on these options can be found in "man ssh_config".

Hope this helps :)

Regards

-- 
Thomas/Schnouki

Attachment: pgpFREvGTIQ0r.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]