Bash script to setup a temporary SSH tunnel - Stack Overflow
jeudi 23 octobre 2014 à 15:23nexen, le 23/10/2014 à 15:23
Ouvrir et fermer un tunnel dans un script:
$ ssh -M -S my-ctrl-socket -fnNT -L 50000:localhost:3306 jm@sampledomain.com
$ ssh -S my-ctrl-socket -O check jm@sampledomain.com
Master running (pid=3517)
$ ssh -S my-ctrl-socket -O exit jm@sampledomain.com
Exit request sent.
(Permalink)
Ouvrir et fermer un tunnel dans un script:
$ ssh -M -S my-ctrl-socket -fnNT -L 50000:localhost:3306 jm@sampledomain.com
$ ssh -S my-ctrl-socket -O check jm@sampledomain.com
Master running (pid=3517)
$ ssh -S my-ctrl-socket -O exit jm@sampledomain.com
Exit request sent.
(Permalink)