3 ms·
I stopped using passwords on servers. That's right, I don't know my password on most of them. How? I use my ssh key pair to authenticate. At one point I regocni
by IgorPartola 11y ago
I stopped using passwords on servers. That's right, I don't know my password on most of them. How? I use my ssh key pair to authenticate. At one point I regocnized that there are much worse things than a compromised server. The attacker can easily replace /bin/login with a program that does in fact log you in, but also emails them your password silently. Then they can try all your other hosts at their leisure and exploit your access until you figure out what's up.
Because of this I now use pam_ssh_agent_auth and try to never enter my actual password into any remote server. Of course this still means there is a risk: I have to forward my ssh agent to the remote server, and an attacker with root access there may in fact hijack that connection and connect to other servers using my credentials. However, (1) this can only happen so long as I am connected to the server, (2) I can be notified every time my private key is used to respond to a challenge, and (3) the attacker never learns any of my personal secret values (password or private ssh key).