Best practice prompting for password

G

GiBo

Hi,

what's the best practice to securely prompt user for password on console
in Python? IIRC some programs like SSH do a lot to ensure that the input
comes from TTY and is not redirected from somewhere and several other
checks. In the case of OpenSSH even the password prompt is always
displayed regardless if the output is redirected to a file or not.

Any pointers to best practice or code snippet of python password prompt?

Thanks

Gibo
 
L

Lawrence D'Oliveiro

what's the best practice to securely prompt user for password on console
in Python? IIRC some programs like SSH do a lot to ensure that the input
comes from TTY and is not redirected from somewhere and several other
checks.

Does it? Why bother?

It's not where the password comes _from_ that you have to be careful about,
it's what you do with it after you get it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top