Skip to content

Using PuTTY ssh tunneling to protect Synergy

I am not by choice a Windows user, but occasionally you have to do what they pay you to do. So, to help a Windows laptop or desktop coexist with UNIX or Mac workstations, using Synergy is a huge life saver. Synergy lets you share one keyboard and mouse, and one set of cut and paste buffers over several machines, much like having a single machine with multiple monitors.

Sadly, that makes the contents of your cut and paste buffers visible on the local network; unless you only share the Synergy connection over ssh tunnels. Setting up ssh tunnels on UNIX and Mac systems is trivial, so I don’t cover that here; but on Windows you need additional software. I use PuTTY because it is free, but others use SecureCRT or other programs.

Instructions for PuTTY:

  1. Download and install PuTTY.exe, for me that is the only PuTTY I need.
  2. Double Click on the PuTTY application icon to start the program (or start it however you prefer).
  3. Click on Category: Session, type in the host name or IP address of your Synergy serving host or workstation, it should be port 22 and ssh by default. Call this session “synergy_tunnel” or something like that, and select Close window on exit Only on clean exit. Save the session.
  4. Click on Category: Window, Behaviour and change the window title to something that indicates this is your Synergy tunnel.
  5. Click on Category: Connection, Data and put your user name on the Synergy serving host into the Auto-login username field.
  6. Click on Category: Connection, SSH to expand it, then click Tunnels and fill in 24800 into the Source Port field, and your Synergy serving workstation’s name or IP into the Destination field, then click the Add button. Local should remain clicked.
  7. Click on Category: Session, again and click the Save button to save your session.
  8. Click on Cancel to exit PuTTY.
  9. Right-Click on the PuTTY application icon (point the pointer at PuTTY and click the right button on your mouse or trackpad, pull down the Create Shortcut option, and make a shortcut to PuTTY.
  10. Right-Click on the Shortcut to PuTTY icon, and select Properties, click in the Target field in the Shortcut tab of Properties and append to the end, after the closing double quote:
     -load "synergy_tunnel"

    (change synergy_tunnel to match your saved session name, and yes, there is a space between the quote after putty.exe and the -load option). Click OK to save the Property change.

  11. Right-Click on the Start Menu icon in the bottom left-side of your screen and select Open. Then Double-Click on the Programs folder/directory. Drag your new Shortcut to PuTTY icon into the Startup folder/directory inside Programs in your Start Menu. Close the Start Menu/Programs Window.
  12. Left-Click on Start Menu/All Programs/Synergy/Synergy to start Synergy client.
  13. Type localhost into the Other Computer’s Host Name field.

From now on, every time you log into Windows with the current user name, PuTTY will automatically start an ssh tunnel to your Synergy serving workstation, and then when you start Synergy client it will use that ssh tunnel for it’s connection. If you also have Synergy set up to start on login, it will fail a few times until you complete the password or key credential exchange over ssh in PuTTY; don’t be alarmed, the errors go away as soon as keys or passwords are exchanged.

Leave that PuTTY Synergy Tunnel session active (though you can minimize it); and shutdown Synergy before you exit the ssh tunnel to avoid errors.