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??

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.