in reply to Re^2: Net::SSH2 Interactive command example
in thread Net::SSH2 Interactive command example
I tried with several methods: print $chan, exec ('comand'), everything in this thread... but still not working. Any idea?if( $ssh2->connect($host) ) { if( $ssh2->auth_password($user,$pass) ) { print "connected.....\n"; #shell use my $chan = $ssh2->channel(); $chan->blocking(0); $chan->shell(); print "sending command....\n"; my $num = 10; while($num--){ sleep(1); } print $chan "mml\n"; select(undef,undef,undef,0.2); print $buf while ($len = $chan>read($buf,512)) > 0;
|
|---|