Der ssh-client erstellt ein .ssh verzeichnis (im Home?) - desshalb der mkdir. Das ist alles was mir dazu einfällt :D
EDIT:
QuoteNet::SSH::Perl->new($host, %params)
To set up a new connection, call the new method, which connects to $host and returns a Net::SSH::Perl object.
new accepts the following named parameters in %params:
A list of RSA/DSA identity files to be used in RSA/DSA authentication. The value of this argument should be a reference to an array of strings, each string identifying the location of an identity file. Each identity file will be tested against the server until the client finds one that authenticates successfully.
If you don't provide this, RSA authentication defaults to using
$ENV{HOME}/.ssh/identity, and DSA authentication defaults to
$ENV{HOME}/.ssh/id_dsa.
Vielleicht willst du also die option setzen?\n\n
<!--EDIT|Thorium|1094124402-->
Per|li|nist der; -en, -en <zu â...ist>: a) Anhänger, Vertreter der radikalen Perlinisten die Perl als die einzig wahre Sprache ansehen; b) Mitglied einer perlinistischen Community.