Let's assume that you will be connecting over ssh.
Then making shh connect without asking for a passwd can
be an option. See my note on Connecting to machines for references of how to do this.
Note: this is not a Perl solution, you may have to talk to your sysadmins!