Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSH Tunnel from linux to linux 1

Status
Not open for further replies.

kapplersvictory

Programmer
Mar 17, 2003
15
ZA
I have always been tunneling from Windows XP and 2000 to my linux server using putty.

How do I establish a ssh connection tunneling port 10000 from another linux PC?


Thank you

KV



I had a cool footer but the webmaster told me to remove it! America is the land of freedom...
 
to tunnel your port 10000 to the linux server's one

Code:
ssh -L10000:your_server_dns_name:10000 your_server_dns_name

example, to connect to linux.yourdomain.com

ssh -L10000:linux.yourdomain.com:10000

You may sometimes need to do the opposite and somehow hi-jack a remote server's port for whatever reason.

For example, if the remote server's web server is not working anymore and you have another one up you can run the following

Code:
ssh -R80:your_client_machine_dns:80 your_remote_machine_dns

example, if you have a server at linux.yourdomain.com and a laptop with a web server at laptop.yourdomain.com, you can run

ssh -R80:laptop.yourdomain.com:80 linux.yourdomain.com

This way you will redirect visitors from the linux web server onto your laptop's web server without them knowing it. Good for emergencies.

QatQat

Life is what happens when you are making other plans.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top