ssh tunnel to another ssh tunnel?

Issue

This Content is from ask ubuntu. Question asked by Amin Nami

In my country (let’s say for example Iran), we do not have access to the internet. We can just reach some internal websites and even we do not have access to Google. In this scenario, I have a VPS in my country(let’s say VPS1) that has access to the Internet and I can ssh-tunnel to it and reach google, But that’s just some filtered restricted Internet.

command: ssh user@vps1 -D 7000 -N

so when I want to connect to unfiltered internet, I have to connect to that VPS1 via ssh, then, I make an ssh-tunnel from VPS1 to VPS2(which is in another country), and then I can have unfiltered internet in VPS1.

command: ssh -i <key> anotheruser@vps2 -D 7001 -N

my question is, is there any other way that I can connect my local machine to unfiltered Internet via this 2 VPSs?



Solution

check the answers

This Question and Answer are collected from askubuntu, is licensed under the terms of CC BY-SA 2.5. CC BY-SA 3.0. CC BY-SA 4.0.

people found this article helpful. What about you?