Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a shell script to export oracle tables. The script will print some text during executing, such as "exporting tt_customers......1343 rows exported". This script was run on redhat 5.7 enterprise server.

The problem is when exporting some big tables, the ssh client will block infinitely. Actually after sometime the script was finished.

Someone said because the ssh client didn't get any response for too long time, the connection was closed. I have changed the putty setting "connection->seconds between keepalives(0 to turn off)" to 60, the script was executed successfully.

But our customers use .net application run the script remotely and I don't want to change the .net application. So I hope to solve it on server side, without changing the client configuration and the command (such as nohup).

I changed config items in /etc/ssh/sshd_config like this:

 ClientAliveInterval 300
 TCPKeepAlive yes
 ClientAliveCountMax  5 

And I restarted the ssh server:

/sbin/service sshd restart

The script still cannot run successfully.

How should I change the configuration?

share|improve this question

migrated from stackoverflow.com Nov 22 '12 at 13:56

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer 1

up vote 0 down vote accepted

You may want to use ServerAliveInterval and ServerAliveCountMax see following question:

http://unix.stackexchange.com/questions/34004/how-does-tcp-keepalive-work-in-ssh

share|improve this answer
    
Thank for your reply. But that's not my purpose. Our customers use .net application to execute the script remotely and I don't want to change the .net application. I missed it in my question. –  bucherren Nov 23 '12 at 1:37
    
Yes, It's better to change the config at client side. –  bucherren Nov 23 '12 at 3:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.