1

I need to connect to server using SSH, and the server has two-factor authentication enabled and secretkey disabled. Now, I can connect "manually" form the shell with the help of Google authenticator app.

Problem is that many of the tools that I regularly use don't support 2FA (i.e. they never ask me for the additional key but simply fail to connect).

Can I somehow make a connection to the server and then "forward" it to a port locally?

P.S.
I'm connecting from a mac, and I don't have root access on the remote server.

frnhr
  • 125
  • 7

1 Answers1

3

You can set up a persistent connection using the initial login, and then instruct ssh to reuse it for all subsequent connections. It's called "ControlMaster" -- there's multiple resources online on how to set it up, e.g. see this PuppetLabs article.

mricon
  • 1,154
  • 7
  • 9