sudo

sudo via ssh

Wednesday, August 12th, 2009 | linux, useful tools | No Comments

By default, if you attempt to run sudo through ssh, when you respond to the password prompt from sudo – it will echo the password back on your console. To avoid this, provide the -t option to ssh which forces the remote session to behave as if run through a normal tty (and thus masks the password), for example,

ssh -t foo.example.com sudo shutdown -r now

Tags: , ,