0

Hi,
i m trying to ssh to a server and run a exe on that using a script file - runremote.sh

All the prints generated by the exe on remote are being displayed on server 1 from where i have executed the script . But after sometime, the execution stops suddenly, dont know why .. is it that the ssh tunnel is getting broken /some ssh timeout happening??

the content in script file is something like

ssh root@server2ip 'cd /export/home1/users/srinivas;
sh test.sh start 1;'

and test.sh is executing a exe (say test.out which is printing somestuff in while loop)

Initially everything works fine , but then after some time (1min), the execution stops .. cant understand y .. any ideas??

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by ennoil
0

Yes, more than likely there is a timeout set on the remote server for SSH connections. You can get around this by placing the following in ~/.ssh/config:
ServerAliveInterval 45
Which will send a "keystroke" to the remote server every 45 seconds.
John

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.