How to add a password in a remote script
Posted: 2018/04/11 03:19:11
I need to update several systems with the command "chkconfig --level 2345 restorecon on".
When I can login directly as root "ssh root@192.168.1.1 < /root/script/update.script" worked fine.
How can I accomplish the same thing as a regular user where I'd need to use sudo and enter a password on the other end?
When I can login directly as root "ssh root@192.168.1.1 < /root/script/update.script" worked fine.
How can I accomplish the same thing as a regular user where I'd need to use sudo and enter a password on the other end?