project: ssh tunnel that doesn't suck (codename meatviewer)
[eostre.git] / meatviewer / client.sh
index 4745489e27c156dcd1fa03dd54062a539610a274..fde5b76661de89e958042df8d30f567501d34d34 100644 (file)
@@ -7,7 +7,7 @@ function print_usage {
        script that sets up a reverse ssh tunnel, and optionally starts a VNC server as well if the START_VNC environment variable is not null
        PORT is the port that your techy needs access to. In general, for graphical issues use 5900 and for command-line issues use 22
        REMOTE_PORT is the port that you'll get on the proxy server, any number over 1000 works as long as you and your techy plug in the same number
-       user@proxy is just your username at the remote proxy machine
+       USER is just your username at the remote proxy machine, if left blank it is assumed to be the same as your username on your local machine
 "
 }
 
@@ -15,15 +15,6 @@ function print_usage {
 
 PORT_TO_FORWARD=$1
 REMOTE_PORT=$2
-PROXY=$3
+USER=${3:-$(whoami)}
 
-ssh -T -R $REMOTE_PORT:localhost:$PORT_TO_FORWARD $PROXY
-
-# quick code that starts up a VNC server for us, if we like
-# this won't run if START_VNC is set
-[ -n $START_VNC ] || exit
-DISPLAY="${DISPLAY:-:0}"
-# -forever - x11vnc won't exit after the first disconnect
-# -shared - allow multiple clients to share the same screen
-# -localhost - only allow connections that are tunneled through localhost
-x11vnc -forever -shared -localhost
+ssh -T -R $REMOTE_PORT:localhost:$PORT_TO_FORWARD $USER