Who remembers the bad TV show Batman? Robin loved to say "holy <something> batman!". Who could forget the bad animated pop-ups that said "BAM!" "SMACK!" "POW!". Man that show was great.
In honor of Eddie’s comment about my holy tutorial I figured I’d give you all another one. I find myself setting up convoluted/complicated things on my computers sometimes and then never documenting them anywhere. Since a blog is supposed to be about not only sharing thoughts and ideas but also putting things back in to the Internet I figured I’d do my documenting here.
So next we look at synergy and encryption.
Synergy (http://synergy2.sourceforge.net/) is an app that works in Windows, Mac OS, and Unix to let you share your mouse and keyboard. I use it every once in a while at home, but I use it every day at work. I have in front of me; three computers, four screens, and only a single keyboard and mouse.
The only down side to synergy is that there is no built in encryption. I don’t feel safe typing in passwords without encryption, it’s just a bad idea.
Due to the PC based firewall that runs on our corporate IT standard XP machines I can’t run the synergy server in Windows, so all of my encryption is from the two Windows machines to the FreeBSD machine (same one I’m backing up to from the previous post). In the past I’ve used PuTTY and manually opened it each time my PC booted. This gets old after a couple years, and it also leaves a window open in my taskbar I wasn’t interested in staring at all the time.
First, install synergy clients on the Windows machines and the server on the Unix machine. The Windows clients are pretty self explanatory, the only catch is you want to tell it the server is localhost since the connection will be encrypted locally via an SSH tunnel. Also, make note of the Screen Name under Advanced, and make sure you have it set to AutoStart when you login.
On the server, make sure it’s set to start at boot (a million different Unix variants here, you’ll have to figure it out yourself). Then create a config. Here is what mine looks like;
right = Windows2
left = Windows1
right = FreeBSD
left = Windows2
Now make it start.
Next, install myentunnel from http://nemesis2.qx.net/software-myentunnel.php
I used the base install so I could just control it starting from my startup menu.
Now install puttygen from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
If you’ve already generated an OpenSSH Key in Cygwin as part of my previous post you’ll want to just import that one by going to the Conversions Menu selecting Import key, and opening your id_rsa from the home dir of cygwin/.ssh. If you don’t have one already, you can just click Generate. If you had to generate one, copy the contents of the public key and put them in the ~/.ssh/authorized_keys on the Unix host. Make sure it’s chmod’ed to 600 so sshd can consider it secure and use it.
Now, save the private key, say ok to having to passphrase, and save it in your myentunnel dir as "keyfile.ppk".
Close puttygen, and open myentunnel.
Under the Settings tab that comes up enter the name of your SSHServer, Username. I selected Connect on Startup, Reconnect on Failure,Use Private Key, and Verbose Logging.
Under the Tunnels tab, enter 24800:localhost:24800
24800 is the port synergy uses and this just makes it tunnel locally as 24800 and then on the remote host, forward the data to localhost 24800.
Now, click Connect, wait for the lock in the system tray to go green, and then click Hide.
Lastly, create a shortcut to the executable in you startup folder and you’re done!
With the SSH tunneling in place you can see synergy gets pretty powerful. I can actually share a mouse and keyboard in my house when the laptop on my desk is VPN’ed in to work by SSH tunneling back in to the house. It’s a *bit* slow, but it definitely works.
There are other alternatives here, including using stunnel, or even more cygwin work, but myentunnel seems to work great so far for me.