Little Story of Lifelong Learning and ssh-add

PUBLISHED ON 30/01/2020 — EDITED ON 11/12/2023 — SYSOPS

This is a nifty little story that happened a while ago, about a man that thought he was somewhat marvelous in Linux.

It goes like this…

There was a man, working with computers, various Linux servers to be exact. So as years passed by, he learned, that instead of entering passwords to connect to the servers via SSH, he could set up the magic ssh-keys, also the security will be better they said. Off he went, created a new key, set up a passphrase, added the public part to the server and tried to connect. Bonkers, the prompt requested a password to connect, even if the key was used. So he tried again, this time, while generating a new key, when the passphrase was requested, he giggled and pressed enter without typing anything. Go and behold, trying to connect to server worked flawlessly, no password was needed and he was happy. Years passed, little did he cared that his keys were not encrypted while resting on the machine. What was important was the fact, that no password was needed. Luckily no harm was done, at least as much as he knew. Keys were changed, new were provisioned, passwords were omitted.

Then one day, the man was watching a youtube tutorial video and the start was pure basics, that he almost skipped. But then, in the mist of pwd, ls, cd and similar commands, the chap that was presenting, used ssh-add to add key to the keyring. Holy shit thought the man, I was doing it wrong for all this years. Quickly did he encrypt all the keys with:

ssh-keygen -p -f id_ed25519

and added them to the keyring.

ssh-add id_ed25519

Lo and behold, no password was needed…

And if I can finish in Eminem style,

“Come to think about, his name was, it was me Damn!”

See Also