running ssh commands with sudoers login
Dear All
I added the following line in /etc/sudoers file <username> ALL=(ALL) NOPASSWD:ALL after adding this if I run any command it is not asking for the password. Now I need to shutdown the remote machine with sudoers user. please help me. Regards konnara |
am i missing something here?? What's the problem... "sudo shutdown" ...:confused:
BTW, that's a *REALLY REALLY* bad thing to do, I'd *VERY* strongly suggest you don't do that ever ever ever. |
|
Hi
I tried ssh <username>@hostip reboot, it is saying reboot: must be superuser. My main idea is to run these command through PHP. I want to list all my render nodes in GUI, Whenever I want any node to be restart, shutdown or change os by using these commands. Thanks in advance Quote:
|
If you only want to reboot your system as normal user than restrict the sudo command to work only with reboot. Otherwise every attacker that manages to find out your password is able to do anything on your machine. Effectively it is a second root account.
|
are you trying to aah login without asking password?
try this link may be useful for you http://servertechz.com/linux/ssh-log...rd-simple-way/ |
Code:
ssh schneidz@hyper sudo shutdown -h now |
All times are GMT -5. The time now is 05:46 PM. |