non-interactive ssh sudo... prompts for the password in plain text
- by Iain
I'm running some non-interactive ssh commands. The ssh authentication is taken care of fine through the ssh agent, but if I run a command that requires sudo then the password prompt in my terminal is plain text. For example:
ssh remotemachine "sudo -u www mkdir -p /path/to/new/folder"
will prompt me for the password in plain text. Does anyone know how I can get it to use the normal secure prompt or that I can pass the password via a switch? (as then I can set up a secure prompt on this side before I send the command)
Any help is much appreciated.