[CoLoCo] ssh but kind of a mac question so please forgive

Kevin Fries kfries at cctus.com
Thu Sep 25 21:32:47 BST 2008


Intranet in the example was a name of a machine, probably resolved via either DNS or /etc/hosts at the SSHD server (not your desktop client).  I could have put the IP addresses of the machines as they would be known by the server, but that would be bad practice since IP addresses may change at a later date.  But if they did, DNS or /etc/hosts should still point to the correct place by name.

So imagine the SSHD server you logged in had the following /etc/hosts file

127.0.0.1       localhost
127.0.1.1       vpn
192.168.1.1 vpn.example.com vpn
192.168.1.2 mail.example.com mail
192.168.1.3 domain.example.com domain
192.168.1.4 intranet.example.com intranet
192.168.1.5 sugar.example.com sugar
<other machines not shown in example would be here>

<skipped all the IPv6 stuff, but it would be here>


Kevin
________________________________________
From: ubuntu-us-co-bounces at lists.ubuntu.com [ubuntu-us-co-bounces at lists.ubuntu.com] On Behalf Of Jim Hutchinson [jim at ubuntu-rocks.org]
Sent: Thursday, September 25, 2008 1:16 PM
To: Ubuntu Colorado Local Community Team
Subject: Re: [CoLoCo] ssh but kind of a mac question so please forgive

On Thu, Sep 25, 2008 at 11:30 AM, Kevin Fries <kfries at cctus.com<mailto:kfries at cctus.com>> wrote:

(again, split on multiple lines for readability, type all in one line)
sudo ssh
  -p 5151
  -i /users/jim/.ssh/mykey
  -L 143:mail:143
  -L 25:mail:25
  -L 389:domain:389
  -L 80:intranet:80
  -L 81:sugar:80
  -L 10001:localhost:10000
  jim at example.com<mailto:jim at example.com>


Okay, that almost clears things up. One question: for -L w:x:y bit above, does it matter what x is? for example, you have -L 80:intranet:80. Does "intranet" map to anything? In actual practice, what would you actually use there? I see what you are getting at in the example, but what would a simple case look like? I'm guess this...

sudo ssh -p 5151 -i /user/../mykey -L 80:localhost:80 jim at example.com<mailto:jim at example.com>

I'm guessing we are saying forward local port 80 to remote port 80 and loop it through remote localhost. Is that correct or would I use something like "intranet" to specifically avoid looping through localhost?

Thanks.

--
Jim (Ubuntu geek extraordinaire)
----
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



More information about the Ubuntu-us-co mailing list