/// <summary>
 /// Change the JVM-wide factory to a different implementation.
 /// </summary>
 /// <param name="newFactory">
 /// factory for future sessions to be created through. If null the
 /// default factory will be restored.
 /// </param>
 public static void setInstance(SshSessionFactory newFactory)
 {
     if (newFactory != null)
         Instance = newFactory;
     else
     {
         Instance = new DefaultSshSessionFactory();
     }
 }