Help for this page

Select Code to Download


  1. or download this
        $ssh->login([ $user [, $password ] ])
    
    ...
         RSA/DSA identity files, though perhaps it should be). And if
         you're running in an interactive session and you've not
         provided a password, you'll be prompted for one.
    
  2. or download this
    use Net::SSH::Perl;
    $ssh = Net::SSH::Perl->new('localhost', debug=>1);
    $ssh->login() or die "login fail!\n";
    ($i,$j,$k) = $ssh->cmd('ls | wc -l');
    print "$i\n";
    
  3. or download this
    localhost.localdomain: Reading configuration data /home/MYUSERNAME/.ss
    +h/config
    localhost.localdomain: Reading configuration data /etc/ssh_config
    ...
    localhost.localdomain: No compat match: 1.2.32.
    localhost.localdomain: Connection established.
    login fail!
    
  4. or download this
    
    $ssh->login('MYUSERNAME','FAKEPASS') or die "login fail!\n";
    ...
    localhost.localdomain: Sending command: ls | wc -l
    localhost.localdomain: Entering interactive session.
         127