474849505152535455
for(String host: hostMap.getKnownHosts()) { try { this.hosts.put(host, new SshManagedHost(host)); } catch(JSchException e) { throw new SshException("Failed to connect " + host, e); } } }
8485868788899091
public Process execute(ExecCommand command) throws IOException { try { return new RemoteSshProcess(sshFactory.connect(host), command); } catch (JSchException e) { throw new SshException(e); } }