SshTaskTimeoutException: Exceeded task timeout; when using sshSession.send(command);
Posted by - NA - on 28 April 2010 09:04 AM
This exception might arise when the shell prompt and the command line terminator is not set according to the server used. By default the shell prompt is set to "$" and the command line terminator is set to "/n". Suppose you are using a Windows server the shell prompt needs to be ">" and the command terminator can be "/r/n". To change these values call the setShellPrompt method and setCommandTerminator method before calling sshSession.connect().

For example,

SshParameters params = new SshParameters(ftpHostname,ftpUsername,ftpPassword);
SshSession sshSession = new SshSession(params);

sshSession.setShellPrompt(">"); //Windows

String result = sshSession.send(command);
(99 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
Full Name:
Help Desk Software by Kayako fusion