Why does SshConnector.getInstance take a long time to return?

Sometimes on a Linux client you may experience SshConnector.getInstance taking up to a minute to return. This problem is caused by the JCE provider SecureRandom implementation because if there is not enough randomness available /dev/random will block until there is.

The delay can however be overcome by setting the following system property:

-Djava.security.egd=file:/dev/./urandom

This has the effect of using an alternative non-blocking random number generator however does come with the price of lower security. 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.