From 175f29f8fab0afc912ab789da93badd71206fb6b Mon Sep 17 00:00:00 2001 From: eostre Date: Fri, 4 Sep 2020 13:59:19 -0400 Subject: [PATCH] add scripts for x11vnc and techy.sh --- meatviewer/client.sh | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100755 meatviewer/client.sh diff --git a/meatviewer/client.sh b/meatviewer/client.sh deleted file mode 100755 index 12633a3..0000000 --- a/meatviewer/client.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -xe - -function print_usage { - set +x - echo \ -" -usage: $0 PORT REMOTE_PORT user@proxy - script that sets up a reverse ssh tunnel - 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. This number gets used as a kind of identifier for your remote support session. - 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 -" - set -x - exit -} - -function get_techy_sshauth { - SSH_PUBKEY=$(curl http://$PROXY/$REMOTE_PORT) || GET_PUBKEY_OVER_HTTP_FAILED=true - if [ -n "$SSH_PUBKEY" ]; then GET_PUBKEY_OVER_HTTP_FAILED=true; fi - if [ "$GET_PUBKEY_OVER_HTTP_FAILED" -eq "true" ]; then - set -x - echo "Automatically fetching your support partner's SSH public key failed, please ask them for their public key and paste it in your terminal here:" - set +x - read -p ":>" SSH_PUBKEY - fi - set -x - echo "Adding your partner's SSH key to your authorized_keys, feel free to delete this line from your authorized_keys once this session is over" - set +x - echo $SSH_PUBKEY >> ~/.ssh/authorized_keys -} - -if [ -n "$@" ]; then print_usage; fi - -PORT_TO_FORWARD=$1 -REMOTE_PORT=$2 -USER=${3:-$(whoami)} -PROXY=e9d.org - -ssh -T -R $REMOTE_PORT:localhost:$PORT_TO_FORWARD $USER@$PROXY -- 2.25.1