in reply to Re: passphrase on a RSA key with net::ssh::perl
in thread passphrase on a RSA key with net::ssh::perl

Hello Ambrus, Thanks for the response. When I do this outside of perl I would do it with SSH_ASKPASS. (i.e. open up ssh-agent and then ssh-add the key - and using SSH_ASKPASS as a simple shell script to provide the password to ssh-add. This automates the whole process and then lets you freely ssh with password protected keys. To tell the truth I havent tested if SSH_ASKPASS is invoked from net::ssh::perl. i.e. say when the script Khen provided up runs. If it is, then this may work as I could set it to a shell script to simply echo the password. Ill have to give it a try :)
  • Comment on Re^2: passphrase on a RSA key with net::ssh::perl

Replies are listed 'Best First'.
Re^3: passphrase on a RSA key with net::ssh::perl
by salva (Canon) on Feb 06, 2011 at 16:59 UTC
    Try using Net::OpenSSH instead of Net::SSH::Perl. As it uses the OpenSSH client to connect to the remote machine, it would also behave in the same way, talking to ssh-agent or asking for the key passphrase on the console or through the X server (via ssh-add).

    What it does not support yet is feeding the passphrase directly from the script to the SSH client.