Closed oditynet closed 1 week ago
This is because a) you did not ask ssh to create a pseudo-terminal for you and b) you used sudo's -S option which will read a password from standard input (not the terminal).
Without a pseudo-terminal is it not possible to disable echo. If you use ssh's -t
option sudo will be able to disable echo. For example:
ssh -t sa@192.168.100.2 sudo yum install
Normally, Sudo will refuse to prompt for a password if it cannot disable echo. However, if you use the -S
option (or enable the visiblepw
option in sudoers) this check is disabled.
The normal behavior is:
$ ssh linux-build "sudo id"
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
May be a found a error?!
i connect to host:
ssh sa@192.168.100.2 sudo -S yum install
and return result:if i do it on terminale, then passwort is NOT SHOW!