class CLITaskConnector {

    public void createConnection()
        throws JSchException
    {
        if ( this.ipAddress != null && this.sshPort > 0 && this.sshPort < 65535 )
        {
            Properties config = new java.util.Properties();
            config.put( "StrictHostKeyChecking", "no" );
            session = SshUtil.getSessionObject( this.sshUser, this.sshPwd, this.ipAddress, this.sshPort, config );
            // session.connect(30000);
            try
            {
                session.connect( 30000 );
            }
            catch ( JSchException e )
            {
                if ( session != null )
                {
                    session.disconnect();
                    session = null;
                    throw e;
                }
                logger.error( "Unable to create jsch CLI session: ", e );
            }
        }
    }

    public  CLITaskConnector( String sshUser, String sshPwd, String ipAddress, int sshPort );

}