How to add a password in a remote script

General support questions
Post Reply
phil.e
Posts: 97
Joined: 2018/02/13 20:28:14

How to add a password in a remote script

Post by phil.e » 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?

Post Reply