sudo via ssh

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

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 sudo shutdown -r now

Tags: , ,

No comments yet.