For instance when running apt-get install.
The trick is then to add the -t option to ssh so you get to write the remote host password.
Like this:
ssh -t example.com "sudo apt-get install nmap"
Without the -t option you would get the following error:
sudo: no tty present and no askpass program specified
No comments:
Post a Comment