command line - SSH keys using gnome-keyring instead of ssh-add - Ask Ubuntu


i'm not sure i'm asking because i'm not pretty sure how of world works, but, have private ubuntu 14.04 server installed using virtualbox, use development, without x server. so, in terminal-land.

i run private server on terminal (vboxmanage startvm), , connect ssh. inside private server, connect public server when need using ssh again.

when connect private server, or use ssh other thing, have type key passphrase once during whole desktop session. don't know responsible that, think gnome-keyring-daemon. inside private server, have type passphrase each time use key (for connecting public server instance). don't want use ssh-agent or ssh-add because don't want prompt connecting private server, if have more 1 passphrase-protected key. also, issue of having ssh-agent instance on each new terminal session.

the gnome-keyring installed in private server don't know how "activate" manage keys, , avoid being prompted passphrase, each time want ssh-connect within private server public server (i have scripts connects multiple times in single run).

lastly, don't forget private server has no desktop , i'm not install it.

what looking ssh-agent. remembers fact unlocked key passphrase , keeps unlocked while logged in. there few different implementations, gnome-keyring provides one, though headless servers can more either call ssh-agent directly in .bashrc, or use keychain app wraps ssh-agent , makes life easier.

keychain should available via sudo apt-get install keychain or on fedora (dnf), centos (yum), or arch (pacman). once have installed can add line eval $(keychain --eval) .bashrc , start , keep 1 instance of ssh-agent running user. if add key name after --eval load named key(s) first time login prompting passphrase(s) right away , keep them tucked away.

you can see keys loaded ssh-add -l , can add key ssh-add ~/.ssh/keyname prompt once passphrase , store until logout or keychain stopped/kill. can add kill command .bash_logout if worried keeping keys unlocked after disconnect.

see nice site excellent links how openssh works , examples, https://www.funtoo.org/keychain , enjoy not typing passphrase repeatedly.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User