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 FTPServerEventHandler
login
in class SSH2FTPOverSFTP
user
- username to log in aspass
- password to authenticate withpublic void quit()
quit
in interface FTPServerEventHandler
quit
in class SSH2FTPOverSFTP
public static void main(java.lang.String[] argv)