It hangs because you haven't told it to do anythingNot really. If you don't tell it to to anything, it will not do anything, but it will not hang either. It will just silently drop the connection when the script exits.
$ time perl -MNet::SSH::Perl -E '$ssh=Net::SSH::Perl->new(localhost, d +ebug => 1); say "connected!"' topo: Reading configuration data /home/salva/.ssh/config topo: Reading configuration data /etc/ssh_config topo: Connecting to localhost, port 22. topo: Remote protocol version 2.0, remote software version OpenSSH_5.8 +p1 Debian-4ubuntu1 topo: Net::SSH::Perl Version 1.34, protocol version 2.0. .opo: No compat match: OpenSSH_5.8p1 Debian-4ubuntu1 topo: Connection established. connected! real 0m0.263s user 0m0.200s sys 0m0.010s
In reply to Re^2: Net::SSH::Perl hanging on creating object
by salva
in thread Net::SSH::Perl hanging on creating object
by gepebril69
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |