summaryrefslogtreecommitdiff
path: root/rapid-tunneling
diff options
context:
space:
mode:
authorAlex Landau <alex.landau@xorcom.com>2008-12-21 15:24:14 +0000
committerAlex Landau <alex.landau@xorcom.com>2008-12-21 15:24:14 +0000
commit01653c7ddffca3d17d6403d733ccb3005f8f2d3b (patch)
treeb343f6f4ad1e00f1956be1ac5217725612c78e8a /rapid-tunneling
parent626edff649102539c65156f7191595957e711aec (diff)
rapid-tunneling:
- Removed old unused files - Minor bugfixes git-svn-id: svn+ssh://xorcom/home/svn/debs/components/rapid-tunneling@6488 283159da-0705-0410-b60c-f2062b4bb6ad
Diffstat (limited to 'rapid-tunneling')
-rwxr-xr-xrapid-tunneling4
1 files changed, 2 insertions, 2 deletions
diff --git a/rapid-tunneling b/rapid-tunneling
index 4949447..1528e2e 100755
--- a/rapid-tunneling
+++ b/rapid-tunneling
@@ -21,12 +21,12 @@ cp $tmpdir/recv/key $HOME/key
tar czf $HOME/ra-params.tar.gz -C $tmpdir/send key origkey
mkdir -p -m 700 $HOME/.ssh
-awk '$NF != "rapid-tunneling" {print}' $HOME/.ssh/authorized_keys > $HOME/.ssh/authorized_keys.new 2>/dev/null
+awk '$NF != "rapid-tunneling" {print}' $HOME/.ssh/authorized_keys > $HOME/.ssh/authorized_keys.new 2>/dev/null || true
cat $tmpdir/send/key.pub >> $HOME/.ssh/authorized_keys.new
mv -f $HOME/.ssh/authorized_keys.new $HOME/.ssh/authorized_keys
chmod 644 $HOME/.ssh/authorized_keys
rm -rf $tmpdir
# Remove host key of $host (in case it has changed)
-ssh-keygen -R $host
+ssh-keygen -R $host 2>/dev/null || true
# Run in background
busybox start-stop-daemon -S -b -m -p $HOME/pid -x /bin/sh -- -c "exec ssh -o 'StrictHostKeyChecking no' -o 'BatchMode yes' -o 'ServerAliveInterval 60' -T -p $port -i $HOME/key -R $tunnelport:127.0.0.1:22 -l $user $host < $HOME/ra-params.tar.gz"