Skip to content
SFTP Library for Processing
Java
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples/sftp_test Add files via upload Aug 7, 2019
library Add files via upload Aug 7, 2019
src/sftp Add files via upload Aug 7, 2019
README.md Update README.md Aug 7, 2019
library.properties Update library.properties Aug 7, 2019

README.md

SFTP Library for Processing

The library uses JSch (Java Secure Channel).

Copyright (c) 2002,2003,2004,2005,2006,2007 Atsuhiko Yamanaka, JCraft, Inc.

import sftp.*;

Sftp sftp;

void setup() {
  size(200,200);
  background(0);
  // Create the SFTP object
  // if 3rd arg = false, you must set the password in your code
  // if 3rd arg = true, you will be prompted to enter your password
  sftp = new Sftp("www.hostname.com","login", true);
  // sftp.setPassword("XXXXXX");
  sftp.start(); // start the thread
  noLoop();
}

void mousePressed() {
  // At any point you can execute an SFTP command 
  // Not all commands are currently implemented
  // but you do have "ls" and "get"
  // Gosh, I should implement "put", sorry!
  sftp.executeCommand("ls");
  sftp.executeCommand("get file.txt");
}
You can’t perform that action at this time.