[ale] ssh -R (was Re: Have I been hacked?)

Ed Cashin ecashin at noserose.net
Tue Jan 13 09:40:31 EST 2009


I'm mainly interested in ssh-ing into virtual machines running
Linux on a Mac mini running VMware Fusion, at this time.

Now that I can do that (Thanks, Chris!), I wanted to share the
magic command.

Background info:

  The office network is 192.168.1.0/24.

  My workstation's IP on the office network is 192.168.1.46.
  Its name is "meili".

  Meili's ssh daemon is listening on a non-standard port, 5555.

  The virtual machine is running CentOS, and VMware Fusion's
  NAT has assigned it the address 192.168.122.132.  (The
  192.168.122.132/24 network is a virtual network existing inside
  of the Mac mini.)  The VM's name is "burke".

The mac mini's IP on the office network doesn't figure into the
command at all, so I won't mention it.

At a shell prompt on burke, as ecashin, I run,

  ssh -p 5555 -v -N -T -R 1101:192.168.122.132:22 192.168.1.46

... or in English,

  ssh to meili's port 5555 and set up a tunnel from meili's
  localhost port 1101 to burke's port 22.

Back at my workstation meili, I can ssh into burke as user
ecashin via,

  ssh -p 1101 127.0.0.1

-- 
  Ed Cashin <ecashin at noserose.net>


More information about the Ale mailing list