1
1
Fork 0
scripts/vncconnect.sh

16 lines
345 B
Bash
Raw Normal View History

2012-06-14 22:52:53 +02:00
#!/bin/bash
if [ -z $1 ]; then
echo "usage: vncconnect.sh <remote-ip>"
exit 1
else
hostname=$1
2012-06-19 20:30:38 +02:00
echo "digging ssh tunnel to $hostname"; sleep 1
2012-06-14 22:52:53 +02:00
ssh $hostname -L 8900/localhost/5901 "sleep 05 && exit" &
sleep 02
vncviewer localhost:8900
echo "killed ssh tunnel to $hostname and ended vnc session"
fi
#end of file