I would either set up a passwordless keypair or use ssh-agent to store the password credentials.
In reply to Re^3: Using Net::SSH2 with DBI by Corion in thread Using Net::SSH2 with DBI by diyaz