Permalink
Browse files

Added tunnel.

  • Loading branch information...
1 parent 09a7517 commit 066ee52ad0675c822847708d0763ebc5e1568b9f @jgm committed Nov 3, 2010
Showing with 23 additions and 3 deletions.
  1. +6 −3 README
  2. +17 −0 tunnel
View
9 README
@@ -1,12 +1,15 @@
A collection of small scripts that serve various purposes.
-word2pdf
- convert Word files to PDF from the command line, using OpenOffice
-
find_duplicate_words
find duplicate words in a text
+tunnel
+ wrapper for setting up an ssh tunnel
+
wiki
start vim with local wiki
+word2pdf
+ convert Word files to PDF from the command line, using OpenOffice
+
View
17 tunnel
@@ -0,0 +1,17 @@
+#!/bin/sh
+#script to establish ssh tunnel connection to protagoras
+
+if [ $# -eq 0 ]; then
+ echo "Usage: tunnel username@machine.dest"
+ exit 1
+fi
+
+DEST=$1
+
+echo "Port on $DEST to connect to: "
+read destport
+echo "Port on localhost to tunnel through: "
+read localport
+echo "Establishing tunnel from local port $localport to port $destport on $DEST."
+ssh -N -L $localport:localhost:$destport $DEST
+

0 comments on commit 066ee52

Please sign in to comment.