my %ssh_options = ( StrctHostKeyChecking => "no" ); my %args = ( username => $user, password => $pass, debug => 1, ssh_args => (options => \%ssh_options) ); my $sftp = Net::SFTP->new($host, %args)