void execSCPWith(ScpCommandLine commandLine) throws SSHException { scp = host.startSession().exec(commandLine.toCommandLine()); }
public SFTPEngine(SessionFactory ssh, String pathSep) throws SSHException { Session session = ssh.startSession(); loggerFactory = session.getLoggerFactory(); log = loggerFactory.getLogger(getClass()); sub = session.startSubsystem("sftp"); out = sub.getOutputStream(); reader = new PacketReader(this); pathHelper = new PathHelper(new PathHelper.Canonicalizer() { @Override public String canonicalize(String path) throws IOException { return SFTPEngine.this.canonicalize(path); } }, pathSep); }
void execSCPWith(List<Arg> args, String path) throws SSHException { final StringBuilder cmd = new StringBuilder(SCP_COMMAND); for (Arg arg : args) cmd.append(" ").append(arg); cmd.append(" "); if (path == null || path.isEmpty()) cmd.append("."); else cmd.append("'").append(path.replaceAll("'", "\\'")).append("'"); scp = host.startSession().exec(cmd.toString()); }
void execSCPWith(ScpCommandLine commandLine) throws SSHException { scp = host.startSession().exec(commandLine.toCommandLine()); }
public SFTPEngine(SessionFactory ssh, String pathSep) throws SSHException { sub = ssh.startSession().startSubsystem("sftp"); out = sub.getOutputStream(); reader = new PacketReader(this); pathHelper = new PathHelper(new PathHelper.Canonicalizer() { @Override public String canonicalize(String path) throws IOException { return SFTPEngine.this.canonicalize(path); } }, pathSep); }
public SFTPEngine(SessionFactory ssh, String pathSep) throws SSHException { Session session = ssh.startSession(); loggerFactory = session.getLoggerFactory(); log = loggerFactory.getLogger(getClass()); sub = session.startSubsystem("sftp"); out = sub.getOutputStream(); reader = new PacketReader(this); pathHelper = new PathHelper(new PathHelper.Canonicalizer() { @Override public String canonicalize(String path) throws IOException { return SFTPEngine.this.canonicalize(path); } }, pathSep); }