15 lines
293 B
Bash
15 lines
293 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
if [ -z $1 ]; then
|
||
|
echo "usage: vncconnect.sh <remote-ip>"
|
||
|
exit 1
|
||
|
else
|
||
|
hostname=$1
|
||
|
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
|