Help for this page

Select Code to Download


  1. or download this
    [root@Remotehost ~]# Starting EXPECT pattern matching...
     at /usr/lib/perl5/site_perl/5.8.8/Expect.pm line 561
    ...
    passwd amagana
    Changing password for user amagana.
    New UNIX password:
    
  2. or download this
    $ssh->send("passwd amagana\n");
    $ssh->expect(60, 'New UNIX Password:');  #linux
    ...
    $ssh->expect(60, '$');
    $ssh->send("exit\n");
    $ssh->close();