Šodienas jautājumu un atbilžu sesija mums priecājas par SuperUser - Stack Exchange dalību, kas ir kopienas vadīta Q & A tīmekļa vietņu grupa.
Jautājums
SuperUser lasītājs user110971 vēlas zināt, kā saglabāt paroles neredzamas, izpildot komandu kā SSH argumentu:
If I run this command and start typing the MySQL password, the password is visible on the screen:
ssh user@server ‘mysql -u user -p’
How can I prevent this? If I log in through SSH and execute the MySQL command, then everything works fine.
Kā jūs varat saglabāt paroles neredzamas, izpildot komandu kā SSH argumentu?
Atbilde
SuperUser atbalstītājs Toby Speight ir atbilde mums:
If you provide a remote command to run, SSH does not allocate a tty, so the remote command is unable to disable echo. You can force SSH to provide a tty using the -t option:
ssh -t user@server ‘mysql -u user -p’
The equivalent option (for -o or for the config file) is RequestTTY. I would caution against using it in the config file because it can have unwanted effects for non-interactive commands.
Vai kaut ko pievienot paskaidrojumam? Skatieties komentāros. Vēlaties lasīt citas atbildes no citiem tehnoloģiju savvy Stack Exchange lietotājiem? Šeit skatiet pilnu diskusiju pavedienu.
Attēlu kredīts: Linux ekrānuzņēmumi (Flickr)