Synergy is a really cool little program that allows one to share a keyboard, mouse, and clipboard seamlessly between multiple computers. I have it set up at work so that I can use my desktop keyboard and mouse to control my laptop.

I’ve been happy with it, but this morning it occurred to me that anyone on my work network could theoretically view all my keystrokes. So today I implemented a script to securely connect to the synergy server from my laptop. It is based on a suggestion from the synergy FAQ.

# Opens a secure synergyc connection
# usage: synergyc_secure server [synergyc options]
# Author: Spencer Bliven


ssh -x -f -L $LPORT:localhost:$RPORT -o ExitOnForwardFailure=yes 
    "$SERVER" 'sleep 10' &&
synergyc "$@" localhost:$LPORT


Leave a Reply

Your email address will not be published. Required fields are marked *