Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] arg) throws IOException, JSchException {
- String remoteA = "/tmp/scp/remote-a/abc.txt";
- String remoteB = "/tmp/scp/remote-b/";
- String local = "/tmp/scp/local/";
- String user = "chanaka";
- String host = "localhost";
- int port = 22;
- String keyFilePath = "/home/chanaka/.ssh/id_rsa";
- String keyPassword = null;
- Session session = createSession(user, host, port, keyFilePath, keyPassword);
- copyLocalToRemote(session, remoteA, local);
- copyLocalToRemote(session, local + "abc.txt", remoteB);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement