Bug 36766 added a (pretty awesome!) tool for sftping files to a remote server from the command line - it would be great if it also supported using keys for authentication to sftp servers. Our tool has something like the following, which works for us and probably would be good to add (or the like): if (defined $privatekey && $secret ) { # case for has a key with a password $sftp = Net::SFTP::Foreign->new("$remote", more => '-v', user => "$user", key_path => "$privatekey", passphrase => "$secret", port => $port, late_set_perm => 1 ); } elsif (defined $privatekey ) { # case for only a key $sftp = Net::SFTP::Foreign->new("$remote", user => "$user", key_path => "$privatekey", port => $port, late_set_perm => 1 ); } else { # case for only username/password $sftp = Net::SFTP::Foreign->new("$remote", user => "$user", password => "$secret", port => $port, late_set_perm => 1 ); }
I missed this in the tree – it got covered directly in Bug 35761. I'm marking it as a dupe.
*** This bug has been marked as a duplicate of bug 35761 ***