diff options
author | René Neumann <rene.neumann@in.tum.de> | 2012-05-19 17:54:38 +0200 |
---|---|---|
committer | René Neumann <rene.neumann@in.tum.de> | 2012-05-19 17:54:38 +0200 |
commit | 6e5c7f5005a9423520d6f7718da1aa9ae980a765 (patch) | |
tree | 98db346d98fc1246b4cf09fdb02c733b382493ca /bin | |
parent | 6a4410567361cdb3523279f9f133c526708d467b (diff) | |
download | dotfiles-6e5c7f5005a9423520d6f7718da1aa9ae980a765.tar.gz dotfiles-6e5c7f5005a9423520d6f7718da1aa9ae980a765.tar.bz2 dotfiles-6e5c7f5005a9423520d6f7718da1aa9ae980a765.zip |
Added script for remote help
Diffstat (limited to '')
-rwxr-xr-x | bin/remhelp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/bin/remhelp b/bin/remhelp new file mode 100755 index 0000000..76c17be --- /dev/null +++ b/bin/remhelp @@ -0,0 +1,41 @@ +#!/bin/zsh + +# This script is intended to help other users. +# It launches an SSH-Tunnel to necoro.eu and makes it forward connections to port 5500 +# (yes! this does not need any firewall hackering) +# +# Ideally used with an VNC-Exe generated by http://www.heise.de/netze/tools/fernwartung +# +# Needs locally: net-misc/ssvnc +# (I couldn't get it to work with any other vncviewer) + +autoload -U colors +colors + +log () { + echo ${fg_bold[white]}">> $1"${reset_color} + } + +cont= + +TRAPINT () { + log "Interrupting..." + cont=x +} + +log "Adding SSH-Key" +ssh-add + +if [[ -z $cont ]]; then + log "Setting up port forwarding" + coproc ssh -tt -R :5500:localhost:5500 necoro@necoro.eu + + log "Starting listening process" + /usr/lib64/ssvnc/vncviewer -noraiseonbeep -encodings "copyrect tight zrle zlib hextile" -listen 0 + + log "Sending 'exit' to SSH-Connection" + print -p exit + + log "Removing SSH-Key" + ssh-add -d +fi |