Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Christophe Pelichet
2022-06-30T08:42:32Z
Hello community,

I'm new here and I'm testing the software and I was wondering if it was possible for a remote task on a server via ssh to pass password via a secure parameter to execute a task in sudo ?

Thanks in advance for your help.

CP
Sponsor
Forum information
Pavel
2022-06-30T14:41:21Z
Hi!

You can try using this trick via Send Text command (per link)

echo -e "YOURPASSWORD\n" | sudo -S yourcommand

Christophe Pelichet
2022-07-06T08:51:37Z
Hello Pavel ,

I thought about this solution but I was wondering if there was a more "secure" solution than writing a password in plain text in a command line.

In any case, thanks for your answer

have a nice days.
Luke Saunders
2022-07-20T21:26:15Z
I have 50+ linux servers that I manage various upkeep using VisualCron. I set up a service user on the VisualCron server, then set up Putty connections to all those linux servers under that user account using a passwordless ssh key in /root/.ssh/authorized_keys on all the linux servers. Then you can use the plink.exe utility that comes with putty to run batches of commands as root.

I've attached a screenshot of the execute task. I'm looping over a list of servers in a Job Variable. The list of servers match the connection names in the Putty profile. The batch commands are stored in text file saved into another Job Variable so you can swap the batches of commands in one place. You need local login+load profile for the Putty profiles to be available to plink. Hopefully this helps.

image.png
Scroll to Top