Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String hostname = "10.10.1.2";
- String username = "myuser";
- String password = "mypass";
- String remoteFile = "/path/to/my/file.txt";
- String localDir = "/path/to/my/destination";
- Connection conn = new Connection(hostname);
- conn.connect();
- conn.authenticateWithPassword(username, password);
- SCPClient scp = conn.createSCPClient();
- scp.put(remoteFile, 2815, localDir, "0644");
- // And here's where I'm confused.
- conn.close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement