Windows Script to SSH into a Remote Server and Execute a Command

46 views Asked by At

I'm looking to create a script that can be used on Windows by double-clicking it.

The script should connect via SSH to a specific port using a hard-coded password and then execute the command "pm2 restart 0."

How can I achieve this?

Samuel

I've already tried using Plink, but it doesn't seem to execute the command as expected. When I use Plink to connect to the remote server via SSH, it successfully establishes the connection, but it doesn't execute the desired 'pm2 restart 0' command. I'm looking for assistance in troubleshooting this issue and getting the command to run as intended.

0

There are 0 answers