-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use with sudo
?
#7
Comments
it is ssh problem (or say security measure), you should use "sudo yourcmd" each time |
No, |
@six-ddc could you please suggest how to deal with the inability to run a command with |
@avently As mentioned above, If your |
I could setup it but I prefer to enter a password because this way I know when scripts I run require a sudo command execution (which is not always a good idea so I can Is it possible to support providing tty somehow (technically)? P.S. I made a bash function that can run commands with |
I have given up on finding a solution for this with bash tools. I now use Ansible for such tasks. It handles sudo well. Use the ad hoc mode to run arbitrary commands. Basically, you can set up an inventory file and then run: ansible all --ask-become-pass --become -a 'apt install blah' This will run the command with sudo on all ( |
@avently Try this way |
@six-ddc this trick will work only if you have the same password on all servers and you want to run one command with root. Also it's not a good thing for security to have password printed in a list of processes. So, better to use for such cases one-liner in bash which allows to enter a password in a right way. Or to use Ansible, as stated above. For example, using this command I almost able to enter a password, but hss doesn't work this way correctly:
So close to solution:) |
When running
sudo
I get:Is there any way to circumvent this?
The text was updated successfully, but these errors were encountered: