Linux bach script failed again why?

Hello @Inderpreet @Tej-Singh-Rana, please can you look at this? why the task was failed?

Since you ran the commands inside your script using sudo so it must have asked you for sudo password for the first time only during that session and later script worked fine.

bash

However as per question

Please make sure script do not ask for password while copying the archive file. Additionally, the respective server user (for example, tony in case of App Server 1) must be able to run it.

So during validation it must have stuck at sudo password prompt.

OK @Inderpreet, i had to remove sudo and change permission to make this right?
Thank you

Yea, you need to run each command without sudo and need to make sure the pass-wordless SSH works without issue among sudo users (not root).

1 Like