Hacker News new | ask | show | jobs
by jon-wood 21 days ago
Set the following in your SSH config, which will cause SSH to establish a single control channel when it first opens a connection to a host and maintain it until there's been 10 minutes of inactivity. That way the first connection requires auth for your SSH agent but it can then be reused for things like SFTP channels or opening another terminal.

  Host \*
    controlMaster auto
    controlPath ~/.ssh/master-%r@%n:%p
    controlPersist 10m