don't use the "ssh_args" specifically. ) my %ssh_options = (options => "StrictHostKeyChecking no"); my %login = (user => $user, password => $pass, debug => 1, \%ssh_options ); ######################################################### #or my %ssh_options = ( StrictHostKeyChecking => "no" ); my %args = ( username => $user, password => $pass, debug => 1, ssh_args => (options => \%ssh_options) ); my $sftp = Net::SFTP->new($host, %args) Normally you should be able to fold this in, as so: my %args = ( username => $user, password => $pass, debug => 1, ssh_args => (options => { StrictHostKeyChecking => "no"} ) );