private static String setPuttyParameters(ConfigSession session) {
		String args = "";

		String host = session.getHost();
		String port = session.getPort();
		String user = session.getUser();
		String password = session.getPassword();
		String file = session.getKey();
		String protocol = session.getProtocol() == null ? "-ssh -2" : session.getProtocol().getParameter();
		String puttySession = session.getSession();

		if (session.getConfigSessionType() == ConstantValue.ConfigSessionTypeEnum.PURE_PUTTY_SESSION) {
			// Putty session must the very first parameter to work well.
			args = " -load \"" + puttySession + "\"";
			if (!user.isEmpty())
				args += String.format(" -l \"%s\"", user);
			if (!password.isEmpty())
				args += String.format(" -pw \"%s\"", password);
			if (!port.isEmpty())
				args += String.format(" -P %s ", port);
		} else {
			args = String.format(" %s %s -l %s ", protocol, host, user);

			if (!password.isEmpty()) {
				args += String.format(" -pw \"%s\"", password);
			}
			// private key
			if (!file.isEmpty())
				String.format(" -i \"%s\"", file);
			if (!port.isEmpty())
				args += String.format(" -P %s ", port);

		}
		logger.debug("Putty parameters: " + args);

		return args;
	}