Just for clarification and the archives....

TN wrote:
Hi,

As far as I can tell you are doing it right according to the manpages.
However, I noticed that in
http://www.squarebox.co.uk/cgi-squarebox/manServer/usr/share/man/man3/Ne
t::SSH::Perl.3pm that $ssh->login() requires a password that you aren't
supplying:


'login' does not require a password. The password is optional, specifically for the OP's case where he wishes to use public key encryption authentication.


$ssh->login("user1", "pass1");

I believe this refers to the linux password.  Perhaps if the password is
not supplied for an interactive login then you will be prompted for it.
But you could disable linux password authentication as an ssh option at
least as a possible workaround:

PasswordAuthentication=no # to be added to my %params

As I recall the default config of sshd/ssh forces password
authentication on top of publickey authentication as an extra security
measure. You might take a look at your sshd and ssh config files to see
how they are set and a combination of tweaking them and the options in
your script may fix the problem.



It is forced by default *if* one of the other specified methods does not succeed.


The sshd/ssh setup that I prefer requires no password authentication if
publickey authentication works, however it will use password
authentication if publickey authentication does not work and I cut keys
with a null passphrase for easier automation of script execution and
interactive logins.

The error message seems to refer to a ssh_agent setup. Ssh_agent is a
special daemon that caches private keys and their passphrases so that
you don't have to keep supplying the latter on the command line to start
new sessions. I've never bothered setting it up but using it should be
more secure than using keys with null passphrases.



Yep but it requires saving the session state and having a login session, which is difficult for scripting and automated tasks. But for things such as X sessions it is great I highly suggest it when empty passphrases are not acceptable.


For reference:

Instructions for ssh_agent configuration are at
http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/s1-op
enssh-client-config.html#S3-OPENSSH-CONFIG-SSH-AGENT.

Manpages for openssh are at http://www.openssh.org/manual.html

Manpages for perl ssh modules are at
http://www.squarebox.co.uk/cgi-squarebox/manServer/usr/share/man/man3/

I don't have a setup now for testing ssh or I would.

Please let me know what works when you find it.

See my other post, it should be an interface issue not a problem with the underlying module.


http://danconia.org


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to