3

When in the graphical environment, seahorse unlocks my ssh key (locked with a passphrase) so I can ssh to another host without entering a passphrase.

But when on the command line, I am still asked for such a passphrase.

Is there a way to have ssh-agent unlock my key on login the way seahorse does? Also, what is the proper way to start ssh-agent on login?

1 Answer 1

2
sudo apt install keychain 

and add

if [ -z "$TMUX" ] ; then keychain -q ~/.ssh/id_rsa; fi . ~/.keychain/$(hostname)-sh 2> /dev/null 

to ~/.bashrc

https://linux.die.net/man/1/keychain

3
  • But I already have ssh-agent installed, as well as seahorse, wouldn't in be a third key agent?... Can't I just use ssh-agent? Besides, does seahorse use ssh-agent/gpg-agent to manage ssh/gpg keys or does it bring its own agent with it? Commented Jan 4, 2021 at 20:02
  • @Ninguém "keychain - re-use ssh-agent ... between logins" you can use just ssh-agent if you want to be asked for a password on every login. Commented Jan 4, 2021 at 20:16
  • Hum! In that case... Commented Jan 4, 2021 at 20:20

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.