We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,154 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

run program in remote through ssh

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
1 Week
Discussion Span
9 Months Ago
Last Updated
2
Views
srinivas88
Light Poster
39 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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

ennoil
Newbie Poster
17 posts since May 2009
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0577 seconds using 2.65MB