ashkulz / NppFTP

Plugin for Notepad++ allowing FTP, FTPS, FTPES and SFTP communications
https://ashkulz.github.io/NppFTP/
320 stars 93 forks source link

Handle SSH_AUTH_PARTIAL to support multi-step authentication #291

Closed pdlan closed 4 years ago

pdlan commented 4 years ago

To support multi-step authentication (e.g. need to provide both public key and password to login), continue to try to authenticate when the result is SSH_AUTH_PARTIAL.

chcg commented 4 years ago

@pdlan How could this be tested?

pdlan commented 4 years ago

https://security.stackexchange.com/questions/17931/possible-to-use-both-private-key-and-password-authentication-for-ssh-login

You could configure your sshd in this way to test.

ashkulz commented 4 years ago

I don't think a do .. while loop is a good idea, a misconfigured server can cause an infinite loop. Maybe put in a limit of 5-10 retries?

pdlan commented 4 years ago

Now the max retry times are limited to 5. Is that OK?

ashkulz commented 4 years ago

Thanks for the contribution, @pdlan!