my $ssh = Net::OpenSSH->new( $host ); push @{$ssh->{_ssh_opts}}, '-oConnectionAttempts=0'; ... #### my $ssh = Net::OpenSSH->new($host, default_ssh_opts => [-o => 'ConnectionAttempts=0'], ...);