Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

ssh-agent + ssh-add or ControlMaster (depending on how you set things up) will share either a key or the whole connection without requiring you to re-authenticate


I use this approach and it works absolutely wonderfully.

The single, small, annoying caveat (there is always one) is that after an unexpected reboot, you will have lingering dead sockets; if you forget to delete them before starting ssh, ssh will complain and will not overwrite the dead socket.

There's probably a way to get it not to do that, but it happens so infrequently to me that I've never bothered.

I've also noticed that if you SSH into some arcane embedded devices, they behave strangely if you try to open a new channel on the same connection. Tread lightly on anything not OpenSSH on the far end.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: