don't try to ssh without key
[pxelator] / lib / PXElator / ssh.pm
index 608be37..19805e2 100644 (file)
@@ -57,6 +57,8 @@ sub shell {
 
        copy_id $ip;
 
+       return unless -e $id_rsa;
+
        warn "# ssh $ip -i $id_rsa";
        my $ssh = Net::OpenSSH->new( $ip,
                master_opts => [ -i => $id_rsa ],