LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-06-2013, 03:06 AM   #16
Turbocapitalist
Member
 
Registered: Apr 2005
Distribution: Ubuntu, Devuan, OpenBSD
Posts: 980
Blog Entries: 3

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
clarification


The above discussion is a little hard to sort out. Can you clarify exactly these machines?

A 115.115.115.115
B 122.122.122.122
C 192.168.100.116

Which one is your desktop?
Which one is the intermediary that you can already SSH to?
Which one is your destination which you can only reach via the intermediary?
 
Old 06-06-2013, 03:41 AM   #17
swaggerlee
Member
 
Registered: Jul 2012
Location: India,Kolkata
Distribution: fedora,ubuntu
Posts: 35

Original Poster
Rep: Reputation: Disabled
@ ALL

here is a scenerio ...

in my office server[X] having two ports one WAN port with direct internet line ip=115.x.x.x
another LAN port with ip=192.168.x.x

one proxy server[Y] with two port WAN ip=115.x.x.y & LAN ip=192.168.x.y running squid port listen on 3128

& let say 5 system connetced in lan using proxy to connect internet where my system ip is 192.168.100.116 (say)

now i have to deliver/upload code,content etc on my client computer who is outside of our network i.e. other city

basically i have to go into server room and i use server[X] to connet to my client since it in direct line, no need of proxy or firewall to browse internet or any... i can connetc to my client machine via ssh as they have also given us a didecated IP i.e. 122.x.x.x

but i want to connetc my client from my local desktop computer with ip=192.168.100.116 using windows xp and putty as client.


HOPE this is enough to explain
 
Old 06-06-2013, 03:51 AM   #18
Turbocapitalist
Member
 
Registered: Apr 2005
Distribution: Ubuntu, Devuan, OpenBSD
Posts: 980
Blog Entries: 3

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
It's still not clear to me.

A:115.115.115.115----B:122.122.122.122----C:192.168.100.116

If you are sitting at C and wanting to connect to A, but unable to make a direct connection yet able to connect to B, then you can follow the steps in #7 above, but substitute the right IP numbers for the ones I provided. There are two methods there, one chaining clients and the other using netcat. If you cannot use SSH to connect to the intermediary then there is likely no method that you can use to connect to the final machine either.

Squid has no relevance to or effect on SSH.
 
Old 06-06-2013, 04:46 AM   #19
a.abdulna
Member
 
Registered: Feb 2013
Location: Bangalore
Distribution: Rhel
Posts: 86

Rep: Reputation: Disabled
Dear swaggerlee,


115 server accessing 122 via any VPN or 122 having public ip ? or is there any tunnel created for 115 server ? Actually we don't know your network architecture better you can contact your Network Administrator. He knows about your network traffic ways and restrictions and all. Maybe they will give you tunnel for this.

Cheers,

Abdul Salam
 
Old 06-06-2013, 05:31 AM   #20
swaggerlee
Member
 
Registered: Jul 2012
Location: India,Kolkata
Distribution: fedora,ubuntu
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
The above discussion is a little hard to sort out. Can you clarify exactly these machines?

A 115.115.115.115
B 122.122.122.122
C 192.168.100.116

Which one is your desktop?
Which one is the intermediary that you can already SSH to?
Which one is your destination which you can only reach via the intermediary?
192.168.100.116 is my local desktop machine(behind proxy)
115.115.115.115 is the intermediary which i can ssh
122.122.122.122 is the intermediary which i can only reach via the intermediary
 
Old 06-06-2013, 05:37 AM   #21
Turbocapitalist
Member
 
Registered: Apr 2005
Distribution: Ubuntu, Devuan, OpenBSD
Posts: 980
Blog Entries: 3

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
Quote:
Originally Posted by swaggerlee View Post
192.168.100.116 is my local desktop machine(behind proxy)
115.115.115.115 is the intermediary which i can ssh
122.122.122.122 is the intermediary which i can only reach via the intermediary
Ok. If the user names are the same on 115.115.115.115 and 122.122.122.122 then here is the example from #7 above with the correct ip numbers:

Code:
ssh -tt 115.115.115.115 ssh -tt 122.122.122.122
Or

Code:
ssh -o 'ProxyCommand ssh %h nc 122.122.122.122 22' \
    -o 'HostKeyAlias=122.122.122.122' \
    user@115.115.115.115
Say which one works best for you.
 
Old 06-06-2013, 07:33 AM   #22
sunilpopaliya
Member
 
Registered: Apr 2012
Posts: 45

Rep: Reputation: Disabled
@swaggerlee

According to your output of tracert 155.115.115.155 command, you don't have access to this server from your local machine.

So ask your network admin to provide you ssh connection from your local machine to 115.115.115.115 server. I think if you are able to ssh 115.115.115.115 server, you may be able to access 122.122.122.122 server via ssh.

sunil
 
Old 06-06-2013, 08:29 AM   #23
swaggerlee
Member
 
Registered: Jul 2012
Location: India,Kolkata
Distribution: fedora,ubuntu
Posts: 35

Original Poster
Rep: Reputation: Disabled
i think m missing some info i'll be back soon with new scenario till then stay tune ....
 
Old 06-06-2013, 09:27 AM   #24
swaggerlee
Member
 
Registered: Jul 2012
Location: India,Kolkata
Distribution: fedora,ubuntu
Posts: 35

Original Poster
Rep: Reputation: Disabled
okk after reading my own post i realized that i have provided u info but missed a little bit i.e. as i said in my previous comments

Quote:
in my office server[X] having two ports one WAN port with direct internet line ip=115.115.115.115
another LAN port with ip=192.168.x.x
since m behind proxy so i can't connect ssh to server[X]with WAN IP 115.115.115.115 but i can connect ssh to server[X] with LAN IP 192.168.x.x

that implies that i'll be unable to connect my remote client from my local machine i.e. from 192.168.100.116---->122.122.122.122

so what next i need to do to establish connection
 
Old 06-06-2013, 09:30 AM   #25
a.abdulna
Member
 
Registered: Feb 2013
Location: Bangalore
Distribution: Rhel
Posts: 86

Rep: Reputation: Disabled
you can connect your machine to X server with 192 series ip then try to connect 112 server, you are able to connect.
(open any terminal try to connect)
 
Old 06-06-2013, 09:43 AM   #26
Turbocapitalist
Member
 
Registered: Apr 2005
Distribution: Ubuntu, Devuan, OpenBSD
Posts: 980
Blog Entries: 3

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
Code:
+----------------+    +-----------------------------+    +----------------+
|        A       |    |            B                |    |       C        |
| 192.168.100.116<---->192.168.x.x   115.115.115.115<---->122.122.122.122 |
|                |    |                             |    |                |
+----------------+    +-----------------------------+    +----------------+
If your network layout is like the above and 115 *can* reach 122, and you can ssh to x.x, then you should be able to connect like this:

Code:
ssh -tt 192.168.x.x ssh -tt 122.122.122.122
If that is not the case, then LinuxQuestions can't really help you. You must seek further guidance from your network administrator first.
 
Old 06-07-2013, 01:04 AM   #27
swaggerlee
Member
 
Registered: Jul 2012
Location: India,Kolkata
Distribution: fedora,ubuntu
Posts: 35

Original Poster
Rep: Reputation: Disabled
HI All
yes i can connect nowwwww thank a lot buddies

but still !! what if want to connect directly i.e

Code:
+----------------+                     +------------------+
|        A       |         via         |        C         |
| 192.168.100.116<---------------------> 122.122.122.122  |
|                |        PROXY        |                  |         
+----------------+                     +------------------+
is there any way i can bypass using putty or linux terminal

Last edited by swaggerlee; 06-07-2013 at 01:06 AM.
 
Old 06-07-2013, 01:09 AM   #28
sunilpopaliya
Member
 
Registered: Apr 2012
Posts: 45

Rep: Reputation: Disabled
@swaggerlee

Still i am telling proxy has no concern with ssh.

Talk to your network admin regarding access you want from your local system.

sunil
 
1 members found this post helpful.
Old 06-07-2013, 02:09 AM   #29
a.abdulna
Member
 
Registered: Feb 2013
Location: Bangalore
Distribution: Rhel
Posts: 86

Rep: Reputation: Disabled
Dear Swaggerlee

You want to connect 112.x.x.x server directly ? Ask your Network Administrator to create a Tunnel between your local machine IP Gateway and Remote location Gateway like any Site to Site VPN using Router or Firewall. Then only your able to connect directly.

Cheers,
Abdul
 
Old 06-07-2013, 04:40 AM   #30
swaggerlee
Member
 
Registered: Jul 2012
Location: India,Kolkata
Distribution: fedora,ubuntu
Posts: 35

Original Poster
Rep: Reputation: Disabled
Okkkk thank you abdulna for reply and thank you all for holding your patience and giving a possible solution

and m sorry if i haven't clearly described my post earlier as i was confused too !!



well i do have another problems lets do it in new thread

3 cheers !!

swaggerlee
 
  


Reply

Tags
clientserver, ip, ssh


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
Connect to a proxy through a middle host with a ssh tunnel iacchi Linux - Networking 3 02-16-2012 01:02 PM
unable to connect to remote host using ssh tariq Linux - Newbie 31 11-04-2011 10:01 AM
ssh can not connect remote host crazy6 Linux - Newbie 2 03-04-2011 08:28 PM
How to connect through restricted proxy to remote host ? haxpor Programming 2 07-27-2007 02:41 AM
how 2 connect 2 remote host using SSH fhameed Linux - Networking 2 09-08-2004 09:42 PM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration