From: MAGANA, A. S I C. U. A. 72 ABW/S. <and...@us...> - 2015-03-26 19:45:24
|
Need help with trying to create a expect.pm script so that I can change passwords on my Solaris-10 and 9 servers. I am using this expect.pm script from my Linux server I also have Net::OpenSSH but I am not using right now. Any examples would help. #!/usr/bin/perl use strict; use Expect; my $ssh = Expect->new('ssh user@host'); #$ssh->debug(1); $ssh->expect(5, q{Password:}); $ssh->send("password\n"); $ssh->expect(5, '$'); #$ssh->send("exit\n"); #$ssh->close(); exp_continue; //SIGNED// Andy Magaña UNIX Systems Administrator Diligent Contractor, 72nd Air Base Wing Tinker Air Force Base, Oklahoma Commercial: (405) 734-0341 |