vncconnect.sh
This commit is contained in:
parent
d5eab96a7d
commit
8a31cf6326
|
@ -0,0 +1,14 @@
|
|||
#!/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
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
hostname="zion.aec.at"
|
||||
|
||||
#xterm -geometry 10x10 -e ssh zion.aec.at -L 8900/localhost/5901 "sleep 05 && exit" &
|
||||
ssh $hostname -L 8900/localhost/5901 "sleep 05 && exit" &
|
||||
sleep 02
|
||||
vncviewer localhost:8900
|
||||
echo "killed ssh tunnel to $hostname and ended vnc session"
|
Loading…
Reference in New Issue