print $chan2 "who \n"; print "Error --> " , $chan2->error() , "\n" ; print "LINE : $_" while <$chan2>; $ssh2->disconnect();