Created
June 8, 2012 04:13
-
-
Save am0c/2893528 to your computer and use it in GitHub Desktop.
Revisions
-
am0c revised this gist
Jun 8, 2012 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,11 @@ # VNC 서버 머신에 vnc-tunnel.sh과 vnc-setup.sh 파일을 넣고 vnc-setup.sh을 실행한다. # 클라이언트에서 vnc-viewer.sh을 실행한다. # # +----------+ ssh +-----------+ ssh +----------+ # | Server |---->| Gateway |<----| Client | # +----------+ +-----------+ +----------+ # ? vnc.gateway.am0c.org ? # #------------ vnc-setup.sh ------------# #!/bin/sh echo 'You should use DSA key (ssh-keygen -t dsa; chmod 400 id_dsa)' -
am0c created this gist
Jun 8, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ # VNC 서버 머신에 vnc-tunnel.sh과 vnc-setup.sh 파일을 넣고 vnc-setup.sh을 실행한다. # 클라이언트에서 vnc-viewer.sh을 실행한다. #------------ vnc-setup.sh ------------# #!/bin/sh echo 'You should use DSA key (ssh-keygen -t dsa; chmod 400 id_dsa)' pgrep -f -x ssh-agent > /dev/null 2>&1 || eval `ssh-agent` echo 'Please add vnc-tunnel.sh to your crontab (*/12 * * * * sh svn-tunnel.sh)' crontab -e #------------ vnc-tunnel.sh ------------# #!/bin/sh CMD='ssh -N -f -R 5904:localhost:5904 vnc@vnc.gateway.am0c.org' vncserver :4 > /dev/null 2>&1 pgrep -f -x "$CMD" > /dev/null 2>&1 || $CMD #------------ vnc-viewer.sh ------------# #!/bin/sh vncviewer -via vnc@vnc.gateway.am0c.org localhost:4