Web lists-archives.com

Re: issues with stretch, part 1 of many




On Nov 27, 2018 at 20:02:19, Étienne Mollier wrote:
> 
> According to my experience, when ssh-agent is started, it is
> ready store passphrase and decipher the private key.  However,
> it doesn't do this automatically when I type my passphrase at
> a connection attempt.
> 
> Before issuing any SSH connection, I run ssh-add and type my
> passphrase.  Afterwards, I can connect to any machine accepting
> my key.  I'm not exactly sure this is the right way to do it in
> terms of security, but it does the job in terms of convenience.
> :^)

Hello Étienne,

I put this in my .bashrc

--------------------------------------------------------------------
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
  eval $(ssh-agent -t 43200)
  ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
ssh-add -l | grep "The agent has no identities" && /usr/bin/ssh-add
-------------------------------------------------------------------

So every time I login the first time, or when the last ssh-add command 
is older than 12h, I'll be asked for the passphrase of the key. 

Michael

Attachment: signature.asc
Description: PGP signature