summaryrefslogtreecommitdiff
path: root/localautossh
blob: 92aa7a4820c31e46c45e276967f8b2d4b9086f63 (plain)
  1. #!/bin/sh
  2. #
  3. # Example script to start up tunnel with autossh.
  4. #
  5. # This script will tunnel 2200 from the remote host
  6. # to 22 on the local host. On remote host do:
  7. # ssh -p 2200 localhost
  8. #
  9. # $Id: localautossh,v 1.1 2007-08-07 16:34:50 jonas Exp $
  10. #
  11. if [ -z "$SSH_ASKPASS" ]; then
  12. export SSH_ASKPASS="ssh-askpass"
  13. fi
  14. if [ "X$SSH_AUTH_SOCK" = "X" ]; then
  15. eval `ssh-agent -s`
  16. ssh-add $HOME/.ssh/id_rsa
  17. fi
  18. #AUTOSSH_POLL=600
  19. #AUTOSSH_PORT=20000
  20. #AUTOSSH_GATETIME=30
  21. #AUTOSSH_LOGFILE=$HOST.log
  22. #AUTOSSH_DEBUG=yes
  23. #AUTOSSH_PATH=/usr/local/bin/ssh
  24. export AUTOSSH_POLL AUTOSSH_LOGFILE AUTOSSH_DEBUG AUTOSSH_PATH AUTOSSH_GATETIME AUTOSSH_PORT
  25. autossh -2 -fN -M 20000 -R 2200:localhost:22 "$1"
D61E@lxp5.free-owl.de?id=fd54908da2b05c526dd3bee9b6dcd093214a220d'>patch) treec69c845069c99d1d01044f6fafda7c08433329c6 /tags/3b/4c/20181011070002.493281CD61E@lxp5.free-owl.de parentba46132213560cf3335d53560d519c0ec0190da2 (diff)
master
Diffstat (limited to 'tags/3b/4c/20181011070002.493281CD61E@lxp5.free-owl.de')