in reply to Re^2: How do you use Net::OpenSSH to query mysql database via ssh tunnel
in thread How do you use Net::OpenSSH to query mysql database via ssh tunnel
Thanks! If I understand correctly, with this command, the tunnel just stays open as long as the master process is running?
Revised code:
use Net::OpenSSH; my $ssh = Net::OpenSSH->new($host); die $ssh->error if $ssh->error; $ssh->system({ssh_opts => ['-O','forward', '-L127.0.0.1:12345:127.0.0.1:3306' ] }) or die $ssh->error;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How do you use Net::OpenSSH to query mysql database via ssh tunnel
by salva (Canon) on May 10, 2017 at 06:53 UTC |