Re: Auto ssh

From: Admin AIX (pc.sa_at_voila.fr)
Date: 08/31/05


Date: 31 Aug 2005 01:40:09 -0700


Adrian Bridgett a écrit :

> Alternatively, _do_ use a passphrase, but use an ssh-agent too!
> Process (from memory), machines A and B.
>
> A: ssh-keygen -t dsa
> (type passphrase)
>
> Then copy ~/.ssh/id_dsa.pub on machine A to ~/.ssh/authorized_keys on
> machine B. Technically you want to append this to authorized_keys.
>
> Alternatively you can use this command to do this for you:
> ssh-copy-id B
> (type _password_ for B)
>
> Now the ssh-agent part. Basically you run an ssh-agent on machine A,
> then you tell it the passphrase which it remembers. When you then run
> ssh it queries the agent and types in the password for you :-) You can
> then get scripts to talk to the agent and tell it to forget the
> password (e.g. when the screensaver activates) or in fact tell the
> agent to forget the passphrases after so long.
>
> So in my .profile I have:
> eval `ssh-agent -s`
>
> Then when I want to ssh, I type in "ssh-add" and type in the
> passphrase. Then all the ssh's I do work automatically with no
> passphrase required. I've then combined this with a program called dsh
> (similar, but not identical to PSSPs one) and can now run commands
> across many machines simultaneously but at the same time pretty darn
> securely.
>
> .shost definitely not required. Just ensure permissions are pretty
> tight on the files, ssh can be very picky (quite right too!)

It works, super, many thanks to you two.



Relevant Pages

  • Re: configuring ssh-agent to automate passphrase for the key
    ... The passphrase is a must for our requirement. ... when captured in a shell $construct and passed to the shell "eval" ... with the background agent. ... only to stop a running agent, via the command ...
    (comp.security.ssh)
  • Re: Opening ports in my firewall
    ... >be sshing in from (or at least a group of possible machines). ... a shared key activated by a passphrase, ... bit of research on shell design, you can limit a login in any way you ...
    (comp.os.linux.security)
  • Re: Auto ssh
    ... Alternatively, _do_ use a passphrase, but use an ssh-agent too! ... Process, machines A and B. ... ssh it queries the agent and types in the password for you :-) You can ...
    (comp.unix.aix)
  • Re: Auto ssh
    ... > Process, machines A and B. ... > then you tell it the passphrase which it remembers. ... > agent to forget the passphrases after so long. ... which is a shell script which automates quite a ...
    (comp.unix.aix)
  • Re: ssh without entering password/passphrase
    ... I created private and public key pairs in my local host ... > this point when I try to ssh, it asks for my passphrase and I can log ... "Could not open connection to your authentication agent". ... What you are missing is that just having ssh-agent run is not enough. ...
    (comp.os.linux.misc)