2 ms·
>For example, when I'm in my laptop and I ssh to my desktop and use sudo, I want it to use the key connected to the laptop to authenticate me. At the same time,
by xienze 8y ago
>For example, when I'm in my laptop and I ssh to my desktop and use sudo, I want it to use the key connected to the laptop to authenticate me. At the same time, if I walk over to the desktop and use sudo, I want it to seek the key in the desktop. Same if I use gpg or anything else that wants to use the key.
This can easily be done, I do it all the time. You have to set up both YKs to have the same PGP keys and then use gpg as your SSH agent.
- jolmg 8y agoThat would be enough, if I would compromise to forego use of sudo and relogin with ssh as root. I really would preper to keep the ability to only sudo the parts of composed commands that need it in my non-root shell session, though, which is why I'm still looking into this. This effort will also allow me to use gpg and the programs that depend on it like my password manager, pass, to use the correct agent.