I know that doing command &> /dev/null
suppresses all output file descriptors.
But I notice that it does not work for commands that request input from the user, most notably ssh
:
> ssh blah@blah.org &>/dev/null
blah@blah.org's password:
Where is this output coming from? And why is not supressed?
One way I've found is to look up the process ID, and find file descriptors being used via
lsof -p <pid>
which shows (for example) /dev/pts/3
, which I can then do
echo -en "\rMy own Custom Password Input Prompt:" > /dev/pts/3
which overrides the prompt, but this is a workaround at best.