aspose file tools*
The moose likes Java in General and the fly likes Anyone familiar with Ssh sessions? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Anyone familiar with Ssh sessions?" Watch "Anyone familiar with Ssh sessions?" New topic
Author

Anyone familiar with Ssh sessions?

santosh batta
Ranch Hand

Joined: Jun 04, 2012
Posts: 36
Hi,
Any one familiar with ssh sessions, can you please tell me where the default command time-out of 120 sec was set? And, did they provide any provision to override the default time?

*******Doing is better than Thinking**********
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19719
    
  20

My guess it's set at the server, inside the sshd_config file.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
santosh batta
Ranch Hand

Joined: Jun 04, 2012
Posts: 36
Hi Rob,
Does that mean, we can't override it? I assume, there should be a provision to set this time-out. Isn't it? I've tried sshSession.sendWait(String cmd, long timeLimit). But I don't know, why its not working. I'm getting error message "Exceeded Task timeout of 120000ms waiting for the end prompt."
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11408
    
  16

my guess is there is not a way to override it. Why would there be? it is a security feature, and allowing someone to override it would make it worthless.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
santosh batta
Ranch Hand

Joined: Jun 04, 2012
Posts: 36
Take for instance, if a script take more than 120s(2 min.) to execute... in that case Ssh sessions won't help me. Am I wrong? If that is the case, can I use any other APIs for this purpose?
 
wood burning stoves
 
subject: Anyone familiar with Ssh sessions?