Rather than making the user specific the agent socket explicitly, add an option named useAgent that tells the SSH client to auto-detect the running SSH agent and use it.
In short, useAgent: true is shorthand for agent: process.env.SSH_AUTH_SOCK. But it also means we can support other ways of detecting the running agent in the future.
Rather than making the user specific the agent socket explicitly, add an option named useAgent that tells the SSH client to auto-detect the running SSH agent and use it.
In short,
useAgent: true
is shorthand foragent: process.env.SSH_AUTH_SOCK
. But it also means we can support other ways of detecting the running agent in the future.