OpenSolaris as Synergy Host
Wednesday, October 22nd, 2008UPDATE 081205: Adding “AllowTcpForwarding” to the sshd_config and restarting SSH should enable port forwarding, as it is disabled by default.
–
I have installed OpenSolaris on my Gateway MT3705 notebook. I know. I must be a glutton for punishment.
I have a Dell desktop that I also use, and like to have my laptop be the “control center”. I accomplish this by using Synergy through an SSH tunnel. Today was the first time I tried to use OpenSolaris as the host for my Synergy setup. And it failed miserably.
After some googling, I found out that the SSH package in OpenSolaris is broken. It doesn’t allow for correct SSH tunneling. Here are some links for reference.
I run Debian on my desktop machine at present. I’ve run SSH tunnels between my laptop and desktop while both were running Debian. No problem. I’ve set up an alias in my .bashrc on each of my boxes so that I don’t have to type the whole command each time:
alias synsetup=’ssh -f -N -L 24800:host:24800 host && synergyc localhost’
Obviously, this assumes that the host and client are already correctly configured. I’ve discussed this previously.
So, I compiled and configured synergy in OpenSolaris, and tried to run the synergys command: No problem. It runs fine, and works great on it’s own, outside of an SSH tunnel. I can connect from the client without issue:
$ ps -ef | grep synergys
chuck 1159 1 0 19:44:13 ? 0:00 synergys$ netstat -an | grep 24800
*.24800 *.* 0 0 49152 0 LISTEN
10.6.101.176.24800 10.6.101.174.38334 9088 0 49232 0 ESTABLISHED
But, running Synergy all alone transmits information between the two host over the network in plain text. So, it’s best to run Synergy through an SSH tunnel.
Here’s a smattering of what I get when I follow the instructions from Synergy’s site on setting up the client through an SSH tunnel:
$ synergyc -f localhost
INFO: synergyc.cpp,716: Synergy client 1.3.1 on Linux 2.6.26-1-686 #1 SMP Thu Oct 9 15:18:09 UTC 2008 i686
DEBUG: CXWindowsScreen.cpp,841: XOpenDisplay(”:0.0″)
DEBUG: CXWindowsScreenSaver.cpp,339: xscreensaver window: 0×00000000
DEBUG: CXWindowsScreen.cpp,111: screen shape: 0,0 2560×1024 (xinerama)
DEBUG: CXWindowsScreen.cpp,112: window is 0×03400004
DEBUG: CScreen.cpp,38: opened display
NOTE: synergyc.cpp,330: started client
channel 2: open failed: administratively prohibited: open failed
NOTE: synergyc.cpp,276: disconnected from server
. . . (until Ctrl-C)
^CDEBUG: CScreen.cpp,49: closed display
NOTE: synergyc.cpp,408: stopped client
So, I googled the error message. The first link shed some light. I dug farther, and found the links I posted above.
So, tunneling is broke on OpenSolaris, but works fine on Debian. Why not reverse it? I set up this alias on my OpenSolaris laptop, to start the Synergy server. It creates a reverse tunnel to the desktop machine, which runs Debian:
synserver_setup=’/usr/local/bin/synergys && ssh -f -N -R 24800:localhost:24800 chuck@client’
The only thing that’s different is the direction from which the tunnel is created. To tunnel from the client to the server from the client, the ‘-L’ flag is used to create the local tunnel. To tunnel from the client to the server from the server, the ‘-R’ flag is used to create the remote tunnel. All set.
/cs