Store ssh passphrase for another session.

18 views
Skip to first unread message

Veera

unread,
May 21, 2019, 10:32:59 AM5/21/19
to Ansible Project

I have a set of ansible client servers accessible from ansible engine using ssh-key and passphrase.


When I run a ansible ad-hoc command , I have to enter passphase on each servers connections and this is repeating for all the tasks.

However from github search , find a way to reduce the enter the passphrase only one time by using the ssh-agent "eval "$(ssh-agent -s)" ; ssh-add ~/.ssh/id_rsa" and by entering passphrase once .


When I exit the shell and re-login the I have to re-run and enter the commands and passphrase again .

How can I avoid this ? Is there a way to store the passphrase as like in ansible-vault and use it for login?

Jonathan Lozada De La Matta

unread,
May 21, 2019, 10:40:05 AM5/21/19
to ansible...@googlegroups.com
I would look into google on how to auto do ssh-add in your .vimrc file. I use oh my zsh and it auto adds it.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4afb31d3-ee5c-4682-b58c-a57161ab83f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Jonathan Cha'gara Lozada De La Matta

He / Him / His

Automation Practice

Senior Automation Consultant & Automation CoP Manager

Red Hat


 

Reply all
Reply to author
Forward
0 new messages