Re: ssh

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Kevin Fries
Date:  
To: Main PLUG discussion list
Subject: Re: ssh
On 12/16/2010 10:51 AM, Michael Havens wrote:
> Best I can tell from google research to tunnel port 5050 data for the
> purpose of getting empathy to work I would type:
>
>      netcat -L port:host:hostport

>
> in my case it would be:
>
>      netcat -L 5050:?:?

>
> how would I figure out the last two variables?


Port = a port on your local computer to use to represent the foreign
service. So in your above case, the 5050 would be your local port and
the service would be available as localhost:5050

Host = The machine running the service

HospPort = port the service is running on on the remote machine.

Example:
Many people before webmin added encryption would ssh tunnel to the
webmin instance. Lets say you wanted to monitor a machine at 1.2.3.4
that was running Webmin on its default port of 10000. But you also ran
Webmin on your local machine on its default port of 10000. Both
instances were run only against localhost, for security reasons. You
would pick a local port, say 10001 (can not use 10000 because it is
being used by the local instance), then you would issue your tunnel
command as such:

# ssh -L 10001:127.0.0.1:10000 me@1.2.3.4

simply stated, this command would create a ssh tunnel for username me,
at 1.2.3.4. Once established, it will create a tunnel to that machine's
localhost instance port 10000, and tunnel it to your local machines port
10001.

Now you would be able to access webmin on your machine at
localhost:10000 and the remote machines webmin at localhost:10001

I assume you are trying to do something similar to this, and hopefully
this example will assist you.

Kevin Fries
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss