I sometimes have an OS-X machine behind NAT that I want to get back to when I’m on the internet.
One way to achieve this is to set up an ssh tunnel on a machine with a known IP.
I put this file in “/Library/LaunchDaemons/com.example.ssh-tunnel.plist”:
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN”
In this example, tunnelhost.example.com is the globally known server, and remote_user is set up with ssh keys to allow passwordless access.
Now if I ssh to tunnelhost.example.com and then ssh to localhost:9922, I get back to the NATed machine.
Another production release, like all future releases, this is a 10.5 or newer version.
- Dragging the bounds window between spaces now works (this is implemented in some embedded Ruby since there was no simple way to do it in Perl).
- Fixed crash when opening windows to hosts that failed.
- Reworked the coloring of windows in select/enable/disable mode. Those rare cases when the color was not reset should be fixed.
- Much faster at opening windows. Some nasty AppleEvents code has helped grab control of the opened window faster.
- –space command line option (and equivalent config command) to open csshX windows in a particular space.
I now have no bugs, and no user feature requests, so I’m getting bored. ;-)
I have finally cut a new csshX package – a lot of good stuff in this one:
- Host and Subnet Ranges – see below
- Ping test hosts before attempting to connect
- Sort terminals by hostname
- Zoom a single terminal to ‘full screen’ key binding
- Added “enable next terminal” key binding
- Added “send slaveid” (a guaranteed unique ID) to a terminal
- Check for users odd shell settings in Terminal.app
- Added the work-around for 10.6 64bit
- Better window placement (less overlaps)
- Use the system stty, not macports
- Better handling of terminal color changes
- Lots of doc typos and spelling fixes (and probably some new ones)
Get it here:
If you have a lot of similarly named hosts, or which to open all hosts in a subnet, hostname ranges will simplify things. Howerver this also allows to open crazy numbers of windows. To avoid this you can use the “ping_test” to make sure a host is up and ssh is working before opening a terminal window.
You can specify subnets using two syntaxes:
This will also work with a hostname, assuming it resolves to a valid IP. If the IP address is not the network address, only that IP and IPs above that address will be used (e.g. 192.168.0.14/28 will only use 2 ip addresses).
A range is declared in square brackets. Rules are separated by commas. Ranges use a minus-sign. Ranges can be numeric or alphabetic.
csshX now on Twitter!
- A new “[s]end” mode that allows you to send host-names/connection strings to all windows
- ssh-options can now be configured or set on the command line.
- p in bounds mode shows you your current bounds, good for pasting into csshrc
- Ctrl-a Ctrl-m to minimise all windows including master
- Ctrl-a Ctrl-h to hide all windows and minimise master (my favourite :-))
- Infinite loop on “enable mode” when some windows have closed.
- Some document corrections
Available at: http://code.google.com/p/csshx/downloads/detail?name=csshX-0.61.tgz