Bug 276 - [Sudo 1.6.8p12] Visible password when sudo is executed through ssh
[Sudo 1.6.8p12] Visible password when sudo is executed through ssh
Status: RESOLVED INVALID
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.8
PC Linux
: normal normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-27 16:29 MST by Andrej Elias
Modified: 2008-01-27 16:45 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej Elias 2008-01-27 16:29:29 MST
When I execute remote command with sudo through ssh, sudo asks for password, but the password is visible on terminal.

u1@PC1:~$ ssh u2@PC2 'sudo /etc/init.d/dnsmasq restart'
u2@PC2's password:
Password:MyPassWord
Restarting DNS forwarder and DHCP server: dnsmasq.
u1@PC1:~$ 

Tested on Sudo version 1.6.8p12
sshd: OpenSSH_4.3p2 Debian-8ubuntu1.1, OpenSSL 0.9.8c 05 Sep 2006
Comment 1 Todd C. Miller 2008-01-27 16:45:17 MST
Not a bug.  If you do not specify the -t flag to ssh it will not allocate a pseudo-tty.  Without a tty it is not possible for sudo (or anything else) to turn off echo.

If you run it thusly:

u1@PC1:~$ ssh -t u2@PC2 'sudo /etc/init.d/dnsmasq restart'

echo will be disabled during password entry.