public static Session openSession(String sshHost, int sshPort, String sshUser, String sshPass) {
		final Session session = createSession(sshHost, sshPort, sshUser, sshPass);
		try {
			session.connect();
		} catch (JSchException e) {
			throw new JschRuntimeException(e);
		}
		return session;
	}
public static Session openSession ( String sshHost , int sshPort , String sshUser , String sshPass ) { final Session session = createSession ( sshHost , sshPort , sshUser , sshPass ) ; try { session . connect ( ) ; } catch ( JSchException e ) { throw new JschRuntimeException ( e ) ; } return session ; }
打开一个新的SSH会话

@param sshHost 主机
@param sshPort 端口
@param sshUser 用户名
@param sshPass 密码
@return SSH会话