LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 09-26-2012, 11:36 PM   #1
arun5002
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 549
Blog Entries: 5

Rep: Reputation: Disabled
Problem in remote ssh port using Port Forwarding


Hi

These the scenerio im trying to work out


Office network
51.26.12.xx(static) -Nated -10.200.2.1(localofficenetwork)

home network
192.168.1.1(home)



Quote:
ssh -L 9580:10.200.2.1:22 root@51.26.12.xx


#netstat -tunelp | grep 9580
tcp 0 0 127.0.0.1:9580 0.0.0.0:* LISTEN 9580 61679 12768/ssh

Now i could find the remote local network 10.200.2.1(port 22) is listening to loop back interface on
port 9580 on my home pc.I try to login into local nated machine using ipaddress 10.200.2.1


But never seems to connect the remote local office machine.Any help ,whether i can achieve the remote office lan network using these scenerio

#ssh root@localhost -p 9580
 
Old 09-27-2012, 12:02 AM   #2
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,433

Rep: Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192
Hi,

sorry I don't know the answer to your question, but I can suggest an easier way to to to the 10.100.2.1 machine from your home. On your home machine add the following to your .ssh/config
Code:
Host 10.200.2.1
     ProxyCommand ssh -qax -W %h:%p 51.26.12.xx
Now you should be able to just ssh to 10.200.2.1 "directly" from your home machine.

HTH,

Evo2.

PS. If your ssh is too old to accept the -W, you can do a trick with netcat instead.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Port number used by server when using dynamic port forwarding in SSH? kreeder Linux - Networking 4 11-21-2011 02:07 PM
Warning: remote port forwarding failed for listen port 7869 windstory Linux - Newbie 1 08-02-2010 10:07 AM
Problem with OpenSSH Remote Port Forwarding with Bind_address ahmad.zuhd General 1 03-07-2010 02:01 AM
Problem with SSH local port forwarding suhas! Linux - Security 3 07-25-2007 10:06 AM
ssh port forwarding problem. jcombs_31 Linux - Networking 2 07-26-2006 06:22 AM


All times are GMT -5. The time now is 02:20 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration