Comprehensive data protection for all workloads
Post Reply
Dave T
Novice
Posts: 3
Liked: 1 time
Joined: Apr 01, 2018 3:25 pm
Full Name: Dave T
Contact:

Difficult Running Post Job Script

Post by Dave T »

I have a very simple bat file (have also tried powershell) that calls "plink". All the script does is provide an SSH key to plink along with the user@host and the command to run. This bat file works perfectly fine as user but consistently fails when running through Veeam.

I've modified my script to capture the program output and record it to a file and when running the script as a regular user I get output, when running through Veeam there is nothing (not even an error message).

Any thoughts on what could be the issue here or how to emulate how a run would be through Veeam?

Thanks!
csydas
Expert
Posts: 193
Liked: 47 times
Joined: Jan 16, 2018 5:14 pm
Full Name: Harvey Carel
Contact:

Re: Difficult Running Post Job Script

Post by csydas »

Hey Dave,

Almost always this is because for whatever reason Veeam wasn't able to load up the script, either because the connection to the VM failed or of a permissions issue internally.

Any chance you're seeing errors on that front with the Veeam Service Account?

Probably want a support case though to look at the logs.
Dave T
Novice
Posts: 3
Liked: 1 time
Joined: Apr 01, 2018 3:25 pm
Full Name: Dave T
Contact:

Re: Difficult Running Post Job Script

Post by Dave T » 1 person likes this post

Turns out that I wasn't capturing any output because plink was printing to standard error 2>&1 was able to resolve this. After capturing the error I was able to see that the user did not have the SSH fingerprint in the registry.

So running

echo y | plink -ssh -i C:\Scripts\backup.ppk -batch user@myhost exit

Was able to get the key into the registry. It seems like there is also a -hostkey option as well which can be used.

Problem solved :)
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 66 guests