This project is read-only.

Interactive Authentication

Dec 3, 2014 at 8:15 AM
Hi,

I can't find any Event, which allows to ask for Authentication informations while Connect() is running.

Currently I have a project where 2 Factor Auth might be used. So I get a PartialSuccess
with pubkey-auth and then the SSH-Server wants a password.

Before Connect() it is not possible to know wether the target wants password, pubkey or
pubkey&password for authentication.

My Idea now is to add Events to SshClient which can be used to ask the user for these
informations while connecting.

Are there any attempts yet or did I overlooked these Events in SshClient?
Dec 5, 2014 at 11:19 PM
i did a simmilar thing when i worte a terminal program.

I also added events and wrote a new Auth-Class which is basically a PasswordAuthenticationMethod with events

then I passed the PuplickeyAuth and the new one to the ConnectionInfo.
Dec 6, 2014 at 9:17 AM
awesome! can you provide a patch?
I'm pretty sure it would be a nice feature for our upstream codebase.
Dec 6, 2014 at 8:23 PM
yes i will see. It is not so easy to get just a patch with this changes...
Im not so sure if it is good for the upstream, because it is a quick and dirty solution...