examples
Class FTPToSFTPProxy

java.lang.Object
  |
  +--com.mindbright.ssh2.SSH2FTPOverSFTP
        |
        +--examples.FTPToSFTPProxy
All Implemented Interfaces:
FTPServerEventHandler

public class FTPToSFTPProxy
extends SSH2FTPOverSFTP

This is a demo of one usage of the FTP over SFTP bridging capability. It starts a local server which acts like an ftp server except that the ftp username is used to address different ssh2 servers (with sftp enabled) to connect to. The format of the ftp username is:

 ssh2-user@ssh2-host[:port]
 

 usage: FTPToSFTPProxy [<listen-address>[:<port>]]
 


Field Summary
static java.lang.String IDENTITY
           
 
Fields inherited from class com.mindbright.ssh2.SSH2FTPOverSFTP
connection, ftp, sftp
 
Constructor Summary
FTPToSFTPProxy(java.io.InputStream ftpInput, java.io.OutputStream ftpOutput)
           
 
Method Summary
 SecureRandomAndPad createSecureRandom()
           
 boolean login(java.lang.String user, java.lang.String pass)
           
static void main(java.lang.String[] argv)
           
 void quit()
           
 
Methods inherited from class com.mindbright.ssh2.SSH2FTPOverSFTP
abort, changeDirectory, delete, initFTP, initSFTP, isPlainFile, list, mkdir, modTime, nameList, pwd, renameFrom, renameTo, retrieve, rmdir, size, store, system
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDENTITY

public static final java.lang.String IDENTITY
See Also:
Constant Field Values
Constructor Detail

FTPToSFTPProxy

public FTPToSFTPProxy(java.io.InputStream ftpInput,
                      java.io.OutputStream ftpOutput)
Method Detail

login

public boolean login(java.lang.String user,
                     java.lang.String pass)
Specified by:
login in interface FTPServerEventHandler
Overrides:
login in class SSH2FTPOverSFTP

quit

public void quit()
Specified by:
quit in interface FTPServerEventHandler
Overrides:
quit in class SSH2FTPOverSFTP

createSecureRandom

public SecureRandomAndPad createSecureRandom()

main

public static void main(java.lang.String[] argv)