#!/usr/bin/perl use strict; use warnings; use Net::SSH::Perl; open IN, ") { chomp; my $ssh = Net::SSH::Perl->new($_); $ssh->login("user1", "pass1"); $ssh->cmd("passwd"); $ssh->cmd("whatever"); $ssh->cmd("whatever"); }