-1

I'm fairly sure this will have been asked before, I have found similar questions but I do not fully understand how to apply them to my situation. So, sorry for asking again.

We have a number of servers located in a data centre which have firewall rules only allowing SSH connections to them from our work external IP. They also only accept authentication with SSH keys. Can I connect to one of these servers via another machine at work and have the key passed on from my machine (at home) for authentication?

Is this an SSH tunnel, or is that something else?

Thanks for your help.

1 Answers1

5

You can use the ssh ProxyCommand functionality for this.

Assume serverA is your jump host, and serverB is the ultimate server you want to connect to. Add the following to your ~/.ssh/config file:

Host serverB 
  Hostname serverB.example.com
  User jimbob
  ProxyCommand ssh serverA.example.com nc %h %p 2> /dev/null

Then from your workstation, just issue this command:

$ ssh serverB
EEAA
  • 110,608