I am executing a BASH shell script (
downloadScript.sh) on a remote server in the below way. Since the script takes more time to execute, the remote shell is getting timed out in between.
ssh -i aws.pem username@remoteserver "./downloadScript.sh"
Please let me know how can make sure that the remote shell alive till the script execution.
Error message I am receiving:
packet_write_wait: Connection to <remoteserver> port 22: Broken pipe
Note: I don't want to modify any configuration on remote server.
How can I add
ServerAliveCountMax to the
ssh -i aws.pem username@remoteserver "./downloadScript.sh" command..!?