in reply to Remote shell via ssh
apparently, password auth doesn't work in Net::SSH2
Given that there's a method specifically for that and no unsolved reported bugs it would be interesting to know what makes you claim this. Perhaps with an SSCCE?
PS. Note that I'm not advocating password auth over publickey auth here, just that the former should be every bit as possible as the latter with Net::SSH2.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Remote shell via ssh
by BernieC (Pilgrim) on Aug 15, 2018 at 11:36 UTC | |
| [reply] |
by pryrt (Abbot) on Aug 15, 2018 at 14:08 UTC | |
BernieC: I was surprised that a basic feature like password authentication wouldn't work. So I tried on a local machine at $work. It worked with the $ssh2->auth_password() for me. After some more looking, I printed out $ssh2->auth_list(), and that gave a clue, which sounded familiar to something I'd read recently. It turned out to have been clarified by what salva (the module's author) already told you in Re^4: Can't get $ssh2->check_hostkey to work: shell02.theworld.com requires keyboard-interactive authentication, but you were using password authentication, which is not the same thing: so you were using the wrong authentication type. The results of my experiment, to make it more explicit:
Notice: my $work host said "publickey,gssapi-with-mic,password" -- ie, it accepts password authentication. But when I checked shell02.theworld.com, it just accepts "publickey,keyboard-interactive". So the valid complaint is "I tried auth_password() even though the host required auth_password_interact(), and it didn't work.". And, I didn't try very many experiments with auth_password_interact(), but the one I showed above showed that "Non-blocking ReadLine is not supported on this architecture", so it might be a valid complaint to say "My host doesn't accept auth_password(); the host claims to accept auth_password_interact(), but trying that on Strawberry didn't seem to work, and gave the error 'Non-blocking ReadLine is not supported on this architecture'". This would be the response I would give to salva's post in the other thread, to flag salva that there's been a response. But to claim that "auth_password just didn't work" does not tell the whole, accurate story. update:: added Re^5: Can't get $ssh2->check_hostkey to work to ask salva about the ReadLine error on strawberry perl edit 2:: added paragraph breaks to make it more readable | [reply] [d/l] [select] |
by hippo (Archbishop) on Aug 15, 2018 at 12:42 UTC | |
I believe this was a windows problem -- several folk confirmed that it worked OK on unix. I see. In that case I will be not be in a position to help you solve it. :-) However, if you can verify that it is a problem with the module (even if only on MSWin32), it would be good to raise that as an issue so that it can be fixed by the maintainers. | [reply] |
by VinsWorldcom (Prior) on Aug 15, 2018 at 14:09 UTC | |
auth_password() works fine on Windows (Win10 x64 / Strawberry Perl 5.24.1). See VinsWorldcom's scratchpad. | [reply] |