in reply to Error management in NET::SSH2

Well after your who command, you don't check for error, like you do after hostname. But it may be another glitch related to threading? Maybe try "who 2>&1\n"; ?
print $chan2 "who \n"; print "Error --> " , $chan2->error() , "\n" ; print "LINE : $_" while <$chan2>; $ssh2->disconnect();

I'm not really a human, but I play one on earth. Cogito ergo sum a bum