my $ssh2 = Net::SSH2->new(); $ssh2->debug(1); if ($ssh2->connect($host)) { if ($ssh2->auth_password($user,$pass)) { #shell use print "connetced\n"; my $chan = $ssh2->channel() and print "channel created\n"; $chan->shell() and print "shell method called\n"; $chan->blocking(1) and print "blocking set ot 1\n"; $chan->write("dir\n") and print "dir fired\n"; select(undef,undef,undef,0.2) and print "select command fired\n"; print $buf while ($len = $chan->read($buf,512)) > 0;