News for hackers. Stuff that matters.
Re:SSH-AGENT-KEEPALIVE – A bash_profile mod that cacches age... by runnerup on Wednesday May 03, 2023 @10:42PM (#35810621)
Curious if this could work to minimize 2FA authentications for repeated short SSH sessions? Particularly ssh commands run by 3rd party software such as Sourcetree. Every new connection requires acknowledgement of 2FA push notification.
Re:SSH-AGENT-KEEPALIVE – A bash_profile mod that cacches age... by ClashTheBunny on Thursday May 04, 2023 @08:49AM (#35814445)
I think you want multiplexing:

https://en.m.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexin...

It creates a control socket that lasts up to x minutes after your last session closes, so for me, all day + 15 minutes, which then new connections go over instead of re-athenticating.

Many places disable it for "security" reasons.

Re:SSH-AGENT-KEEPALIVE – A bash_profile mod that cacches age... by ogsuspect on Thursday May 04, 2023 @12:35PM (#35818158)
See ClashTheBunny's comment about Control sockets. You can `man 5 ssh-config` and search for the following settings 'ControlMaster', 'ControlPath', 'ControlPersist'. ControlMaster is a yes/no/auto... you probably want 'auto'. ControlPath is the path where the control socket is created. You probably want something dynamic like `ControlPath ~/.ssh/ctrl-%h`. ControlPersist specifies how long the control socket should remain open for. This enables SSH connection multiplexing.