I have an Ansible server with 3 ubuntu servers (hosts). So i want to be able to logon to those servers by typing in the SSH key password once. I have edited my .bashrc with an alias.
alias ssha='eval $(ssh-agent) && ssh-add'
Whenever i login to the Ansible server and do:
foulan@ansible-server:~$ ssha
Agent pid 1396
Enter passphrase for /home/foulan/.ssh/id_ed25519:
If i typ in the password for the ssh-key, i'm able to login every server without prompting the password. But if i go after that in root mode by typing sudo su.
And again try to ssh in to one of my servers it asks me for me for the password.
But if i run
ps aux | grep ssh
it still shows me that the ssh-agent in the back is running ??
I basically want to be able to ssh to any server in root mode without typing the pass everytime
Any help would be appreciated,