antoniomika / sish

HTTP(S)/WS(S)/TCP Tunnels to localhost using only SSH.
https://ssi.sh
MIT License
4.03k stars 308 forks source link

Add password authentication request validation #323

Closed EpicEric closed 2 months ago

EpicEric commented 2 months ago

This adds a password-based authentication mechanism under the option --authentication-password-request-url, which functions similarly to --authentication-key-request-url, but takes a password instead of a public key.

Closes #322

EpicEric commented 2 months ago

This seems to work on my sish instance, with a simple verification server that checks for a single password and returns 200. I've used a command like this one for testing (which then prompts me for the password):

ssh -o PubkeyAuthentication=no -o PreferredAuthentications=password -R test:80:localhost:8080 tuns.sh

I haven't tested the timeout, however since this is basically a copy-pasted version of --authentication-key-request-url, it should work the same.

antoniomika commented 2 months ago

Thanks for the awesome contribution @EpicEric!