LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 01-25-2005, 04:40 AM   #1
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Rep: Reputation: 56
ssh tunneling with -L only for localmachine


Sorry, this might have been answered before, but could not get the searchengine to search case sensitive for option -L instead of -l.

I have system A, system B and System C. A is my desktop. B and C are servers. I need to reach C directly from A, which I cannot due to routing issues (which I cannot remedy)
....If A drives with 50 mph and C with 70mph, when will they meet in the middle....
Blast, sorry, I went into math-problem-from-school mode ;-)

Resuming:
I can reach C when connecting first to B and then to C.
I know that I can use ssh to tunnel the connection with:
ssh -L 2222:C:22
executing it on B. This command does not work, to my surprise. I got to log in again to make it work.
ssh -L 2222:C:22 B

This then opens port 2222 on server B to point to port 22 on server C, which is exactly what I want, BUT:
I cannot find this port when connecting (and nmaping) from A. It is only reachable locally on B.

Netstat gives some clue:
tcp 0 0 serverB:2222 *:* LISTEN
So, somehow the service only listens for requests that originate from serverB directly. I notices that other services have a joker (i.e. *:ssh), which implies to me "from everywhere".

How can I get this thing to open up this tunnel also for external hosts?
Is there a way to execute the ssh tunnel without loging in again (giving the password and opening another shell)?

Cheers

Markus
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tunneling thru ssh c9876543210 Linux - Networking 1 07-21-2005 12:45 AM
X tunneling with SSH phekno Linux - Networking 3 05-31-2005 10:43 AM
SSH tunneling X AzZuM Linux - Security 3 11-27-2004 01:59 AM
Tunneling through SSH rech Slackware 1 11-28-2003 08:21 PM
tunneling with ssh barbanero Linux - Security 2 01-24-2002 10:53 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 10:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration