$sshconn->register_handler("stdout", sub { my($outchannel, $outbuffer) = @_; print(FOUT $sshconn->type); });