I am using the JSch API for Java for SFTP connections. Sometimes the server may be down for a second or the connection may be busy. In these cases I would need to re-connect to the server three times at least before I decide the connection has failed.
Does JSch provide any configuration option to do this automatically?
JSch has no such configuration option, but you can simply do this yourself.
After executing this block, either the session is connected or a JSchException is thrown.