summaryrefslogtreecommitdiff
path: root/remote-access
diff options
context:
space:
mode:
Diffstat (limited to 'remote-access')
-rwxr-xr-xremote-access27
1 files changed, 0 insertions, 27 deletions
diff --git a/remote-access b/remote-access
deleted file mode 100755
index 02ae4e7..0000000
--- a/remote-access
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-if [ -z "$1" ]; then
- echo "Usage: $0 <remote-access-file-name>" 1>&2
- exit 1
-fi
-
-rm -rf /tmp/ra
-mkdir -m 700 /tmp/ra
-mkdir /tmp/ra/recv /tmp/ra/send
-gunzip -cf $1 | tar xf - -C /tmp/ra/recv
-dropbearconvert openssh dropbear /tmp/ra/recv/key /tmp/ra/recv/key.db
-chmod 600 /tmp/ra/recv/key.db
-user=`cat /tmp/ra/recv/user`
-host=`cat /tmp/ra/recv/host`
-port=`cat /tmp/ra/recv/port`
-tunnelport=`cat /tmp/ra/recv/tunnelport`
-
-dropbearkey -t rsa -f /tmp/ra/send/key.db | grep '^ssh-rsa ' > /tmp/ra/send/key.pub
-dropbearconvert dropbear openssh /tmp/ra/send/key.db /tmp/ra/send/key
-cp /tmp/ra/recv/key /tmp/ra/send/origkey
-tar czf /tmp/ra/send/ra-params.tar.gz -C /tmp/ra/send key origkey
-
-mkdir -m 700 /tmp/ra/.ssh
-cat /tmp/ra/send/key.pub >> /tmp/ra/.ssh/authorized_keys
-chmod 644 /tmp/ra/.ssh/authorized_keys
-start-stop-daemon -S -b -x /bin/sh -- -c "ssh -y -K 10 -T -p $port -i /tmp/ra/recv/key.db -R $tunnelport:127.0.0.1:22 -l $user $host < /tmp/ra/send/ra-params.tar.gz"