0

I have a Ubuntu Desktop client and two Ubuntu server.

Ubuntu servers are two separate VPS in Germany and Netherland.

I need to route SSH traffic through Germany VPS, for example;

When I run ssh root@GERMANY_VPS on my client machine, it connects me to Netherland VPS.

In other words Germany VPS just forward SSH traffic and passes it to Netherland VPS.

Thanks.

1 Answer 1

0

I presume you mean that you can't connect directly to the host in the Netherlands but the host in Germany can connect to this.

Just use the host in Germany as a jumphost:

ssh -J german_user@germany_vps dutch_user@netherlands

or add an ssh config....

Host germany_vps
   hostname germany_vps.example.com
   user german
   identityFile ~/.ssh/rsa_id.german

Host netherlands_vps
   hostname netherlands_vps.example.com
   user dutch
   identityFile ~/.ssh/rsa_id.dutch
   ProxyCommand ssh -q -W %h:%p germany_vps

Then simply....

ssh netherlands_vps

When I run ssh root@GERMANY_VPS

Please don't do that.

Unless you know exactly what you are doing (and this clearly does not apply here) you should not allow root access via ssh.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .