65 sub login { 66 my $ssh = shift; 67 $ssh->SUPER::login(@_); 68 my $suppress_shell = $_[2]; 69 $ssh->_login or $ssh->fatal_disconnect("Permission denied"); 70 71 $ssh->debug("Login completed, opening dummy shell channel."); 72 my $cmgr = $ssh->channel_mgr; 73 my $channel = $cmgr->new_channel( 74 ctype => 'session', local_window => 0, 75 local_maxpacket => 0, remote_name => 'client-session'); 76 $channel->open; 77 78 my $packet = Net::SSH::Perl::Packet->read_expect($ssh, 79 SSH2_MSG_CHANNEL_OPEN_CONFIRMATION); 80 $cmgr->input_open_confirmation($packet); 81 82 unless ($suppress_shell) { 83 $ssh->debug("Got channel open confirmation, requesting shell."); 84 $channel->request("shell", 0); 85 } 86 }