LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-22-2010, 05:05 PM   #1
nko
LQ Newbie
 
Registered: Apr 2005
Posts: 20

Rep: Reputation: 1
Using a Public-Facing SSH Server to Broker a Connection Between Two Clients


Hi,

I'm sure this is possible... I'm just not sure how. Yet!

I have three machines. One is at home behind my firewall and has a dynamic IP. That's fine as I don't really want to open any ports on my home firewall. The second is at work sitting behind the firewall there- and I'm not even going to ask for approval to NAT an IP to my PC at work :-).

The third is in a data center far away. I only have a shell account on this server but other than that shell account not being root, I can do most anything I like with that account.

What I would like to do is SSH to this server simultaneously from my home and work PCs and, via this third machine, make them talk.

This is pure geekery so it doesn't matter what they say to each other; I just want to make them talk. Maybe one uploads a file and the other just pulls down that file. Maybe one opens a FIFO on the remote server and starts writing to it while the other starts snarfing that data. In fact, I like this latter idea best, I think.

How would you do it? What scripts (fired by cron if need be since I'm ostensibly away from at least one of the PCs at any given time) would you use?
 
Old 02-22-2010, 07:14 PM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,127
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
It's actually pretty easy, have one open a local forwarded port and the other open a remote forwarded port then you can ssh from the local one to the other box.


ssh -L 2048:localhost:2048 user@central_host

and on the other
ssh -R 2048:localhost:2048 user@central_host

then from the one with the -L entry you can just ssh -P 2048 user@localhost and it'll connect you to the 2nd box via the central server

I use something like this to sshfs mount directories from the remote machine
 
  


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
Setting up a VPN for windows clients to reach debian server over the public Internet irvken Linux - Networking 1 01-30-2010 05:35 AM
public IP and ssh connection mokku Solaris / OpenSolaris 3 12-18-2009 04:44 AM
public IP and ssh connection mokku Solaris / OpenSolaris 2 12-16-2009 10:23 AM
VPN Server: need help setting up a public server accessible by win xp clients hamish Linux - Networking 6 09-20-2006 02:39 AM
upgraded ssh, now can't make public key connection BrianK Linux - Networking 0 04-10-2004 05:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:29 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
Open Source Consulting | Domain Registration