sshShellInputs.getCommand(), sshShellInputs.getCharacterSet(), usePseudoTerminal, } else { commandResult = service.runShellCommand( sshShellInputs.getCommand(), sshShellInputs.getCharacterSet(), usePseudoTerminal,
sshShellInputs.getCommand(), sshShellInputs.getCharacterSet(), usePseudoTerminal, } else { commandResult = service.runShellCommand( sshShellInputs.getCommand(), sshShellInputs.getCharacterSet(), usePseudoTerminal,
if (StringUtils.isEmpty(sshShellInputs.getCommand())) { throw new RuntimeException(COMMAND_IS_NOT_SPECIFIED_MESSAGE); sshShellInputs.setCommand(sshShellInputs.getCommand() + " " + sshShellInputs.getArguments());
private void runSSHCommand( SSHShellInputs sshShellInputs, Map<String, String> returnResult, SSHService service, String sessionId, boolean saveSSHSession) { int timeoutNumber = StringUtils.toInt(sshShellInputs.getTimeout(), Constants.DEFAULT_TIMEOUT); boolean usePseudoTerminal = StringUtils.toBoolean(sshShellInputs.getPty(), Constants.DEFAULT_USE_PSEUDO_TERMINAL); boolean agentForwarding = StringUtils.toBoolean(sshShellInputs.getAgentForwarding(), Constants.DEFAULT_USE_AGENT_FORWARDING); sshShellInputs.setCharacterSet(StringUtils.toNotEmptyString(sshShellInputs.getCharacterSet(), Constants.DEFAULT_CHARACTER_SET)); // run the SSH command CommandResult commandResult = service.runShellCommand( sshShellInputs.getCommand(), sshShellInputs.getCharacterSet(), usePseudoTerminal, Constants.DEFAULT_CONNECT_TIMEOUT, timeoutNumber, agentForwarding); handleSessionClosure(sshShellInputs, service, sessionId, saveSSHSession); // populate the results populateResult(returnResult, commandResult); }
if (StringUtilities.isEmpty(sshShellInputs.getCommand())) { throw new RuntimeException(COMMAND_IS_NOT_SPECIFIED_MESSAGE); sshShellInputs.setCommand(sshShellInputs.getCommand() + " " + sshShellInputs.getArguments());
if (StringUtilities.isEmpty(sshShellInputs.getCommand())) { throw new RuntimeException(COMMAND_IS_NOT_SPECIFIED_MESSAGE); sshShellInputs.setCommand(sshShellInputs.getCommand() + " " + sshShellInputs.getArguments());