in reply to Password change (Newbie)

You have your constructor in the wrong place.. try this:
#!/usr/bin/perl use strict; use warnings; use Net::SSH::Perl; open IN, "<hosts.txt" or die "Can't open users.txt"; while(<IN>) { chomp; my $ssh = Net::SSH::Perl->new($_); $ssh->login("user1", "pass1"); $ssh->cmd("passwd"); $ssh->cmd("whatever"); $ssh->cmd("whatever"); }