examples
public class FTPToSFTPProxy extends SSH2FTPOverSFTP
ssh2_user@ssh2_host[:port]
Usage:
java -cp examples.jar examples.FTPToSFTPProxy
[listen_address[:port]]
connection, ftp, sftp| Constructor and Description |
|---|
FTPToSFTPProxy(java.io.InputStream ftpInput,
java.io.OutputStream ftpOutput)
Construct an FTP to SFTP proxy which uses the given streams to
communicate with an FTP client.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
login(java.lang.String user,
java.lang.String pass)
Connect and log in to the SSH server
|
static void |
main(java.lang.String[] argv)
Run the application
|
void |
quit()
Close connection
|
public FTPToSFTPProxy(java.io.InputStream ftpInput,
java.io.OutputStream ftpOutput)
ftpInput - input stream from ftp clientftpOutput - output stream to ftp clientpublic boolean login(java.lang.String user,
java.lang.String pass)
login in interface FTPServerEventHandlerlogin in class SSH2FTPOverSFTPuser - username to log in aspass - password to authenticate withpublic void quit()
quit in interface FTPServerEventHandlerquit in class SSH2FTPOverSFTPpublic static void main(java.lang.String[] argv)