http://www.perlmonks.org?node_id=549056


in reply to Specifying identify file with Net::SCP

Assuming that your identity file name stays constant, the quick and easy way would be to specify your alternate id file in your ~/.ssh/config file.

You can do this on a per-host basis.

Something like

Host Box1 IdentityFile /home/goober/.sshalt/id-alt1