Auf Kommentar antworten

Bild von epe

Get Quicksynergy secured with ssh really easy!

Since I wanted to have quicksynergy set up with an ssh tunnel for a long time, I finally thougth about a way to make things easier:

1) hack a wrapper-script together, which does the magic ssh tunneling

2) still use the nice GUI from quicksynergy

3) don't need to start the client seperately - the wrapper script will take care of this!

Since things are a bit confusing:

LOCHOST is the one, where your keyboard & mouse is connected to. We will use Quicksynergy with this and it will run synergys on this side.

REMHOST is the PC which will be remotely controlled via synergy. Our wrapper script will take care of starting synergyc on this side.

This is a draft for the wrapper script, which should be put in: /usr/local/bin/synergys

I still need to include the parsing of the config file. The filename of the config file is passed in the commandline, so we can get the hostname of the remote host from the screenname defined in the config. If you like to do the parsing .. you're welcome to leave a comment on how you did it!

#! /bin/bash -x


LOCHOST="clementine.local"
REMHOST="freebook" #needs to be just the hostname (without .local)"
PORT=24800
REMCMD="/usr/bin/synergyc -f --no-restart --name $REMHOST localhost"

# PARSE $* TO GET REMOTE AND LOCAL HOSTNAME
# replace hostnames # take it for granted, that screenname.local ist remote hostname.

killall /usr/bin/synergys
/usr/bin/ssh ${REMHOST} 'killall /usr/bin/synergyc'

/usr/bin/synergys -d FATAL $* &

#/usr/bin/ssh -R 24800:clementine.local:24800 freebook.local '/usr/bin/synergyc -f --no-restart --name freebook localhost '
/usr/bin/ssh -R ${PORT}:${LOCHOST}:${PORT} ${REMHOST} ${REMCMD}

# doesn' get to this point yet. how do we handle the stopping of quicksynergy?
killall /usr/bin/synergys

Trackback URL for this post:

http://epe.at/trackback/1434
Super vakantie

De beste vakanties

epe's status on Monday, 01-Feb-10 11:56:03 UTC

Neu: Get Quicksynergy secured with ssh really easy! (http://epe.at/node/1434)

Antworten

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt. Wenn Sie ein Gravatar-Konto haben, wird dieses verwendet, um Ihr Benutzerbild darzustellen.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br>
  • Zeilen und Absätze werden automatisch erzeugt.
  • Identica-style @usersnames are linked to their Identica account pages.
  • Identica-style #hashtags are linked to search.identi.ca.

Weitere Informationen über Formatierungsoptionen

CAPTCHA
Diese Frage dient dazu festzustellen, ob Sie ein Mensch sind und um automatisierte SPAM-Beiträge zu verhindern.