khandielas has asked for the wisdom of the Perl Monks concerning the following question:
Hi, Monks, good day.
I wonder anybody tried Net::SFTP::Foreign with priv key with passphrase and also password before?
Here is a good thread about how to support both key and password authentication. salva gave a lot of explanations.But in this case, no passphrase was mentioned. Does Net::SFTP::Foreign support identity file and user password?
In my case, if I pass passphrase in the hash, it will give me error: Invalid option 'password' or bad combination of options at ..../MySFTP.pm line .... Here is the code sample:
my $sftp = Net::SFTP::Foreign->new( $sftp_host, more => [ '-o', "IdentityFile=$ssh_key_path", '-o', 'PreferredAuthentications=keyboard-interactive,pas +sword,publickey', '-vvv' ], user => $sftp_user, password => $sftp_password, passphrase => $sftp_passphrase, timeout => 10, port => $port, stderr_fh => $my_err );
I can manually log into remote server with passphrase and password typed in when being asked.
Thank you very much.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SFTP::Foreign does not support both passphrase and password?
by salva (Canon) on Oct 13, 2015 at 16:59 UTC | |
|
Re: Net::SFTP::Foreign does not support both passphrase and password?
by RonW (Parson) on Oct 14, 2015 at 18:33 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |