|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.enterprisedt.net.ftp.AdvancedSSHSettings
public class AdvancedSSHSettings
Advanced settings specifically for the SFTP (FTP over SSH) protocol. Generally these settings are not required for basic use of the protocol.
All settings must be set before connecting to the server.
| Method Summary | |
|---|---|
void |
disableAllAlgorithms()
Disables all algorithms. |
void |
disableAllAlgorithms(int algorithmType)
Disables all algorithms of a particular type. |
SSHAuthenticationType |
getAuthenticationType()
Get the type of authentication that is set up to be used. |
SSHFTPAlgorithm[] |
getEnabledAlgorithms()
Returns an array containing all enabled algorithms (of all types). |
SSHFTPAlgorithm[] |
getEnabledAlgorithms(int algorithmType)
Returns an array containing all enabled algorithms of a particular type. |
int |
getMaxPacketSize()
Get the max packet size set |
byte[] |
getPrivateKeyBytes()
Returns a byte-array containing the client's private key if one has been set. |
java.lang.String |
getPrivateKeyFile()
Get the path of the file from which the client's private key was read (if setPrivateKeyFile was previously called). |
java.lang.String |
getPrivateKeyFilePassphrase()
Get the passphrase for the private key file. |
java.io.InputStream |
getPrivateKeyInputStream()
Returns an InputStream for the client's private key, used for client authentication if SSHAuthenticationType.PUBLIC_KEY is being used. |
java.lang.String |
getRemoteEOL()
Get the remote EOL string that is forced to be used irrespective of what is detected from server information. |
SSHAuthPrompt[] |
getSSHAuthPrompts()
Get the array of authentication prompts that are to be used for keyboard-interactive authentication. |
SSHFTPValidator |
getSSHServerValidator()
Returns a reference to the host validator, which validates the server's public key. |
boolean |
isDisableWaitForChannelClose()
Is waiting for server acknowledge on closure of a channel disabled? |
boolean |
isPortsInKnownHosts()
Are non-standard port numbers used in known_hosts files? If so then hosts are stored as [hostname]:port if the port number is not 22. |
boolean |
isRekeyEnabled()
Is re-keying after 1 GB enabled? If enabled (the default), after 1 GB of transfer a new set of cryptographic keys are established. |
void |
setAlgorithmEnabled(SSHFTPAlgorithm algorithm,
boolean enable)
Enable/disable the given algorithm. |
void |
setAuthenticationType(SSHAuthenticationType sshAuthenticationType)
Set the authentication type to be used. |
void |
setDisableWaitForChannelClose(boolean disableWaitForChannelClose)
Disables waiting for an acknowledgement from the server when the client has requested that a channel be closed. |
void |
setMaxPacketSize(int maxPacketSize)
Set the maximum packet size. |
void |
setPortsInKnownHosts(boolean portsInKnownHosts)
Change whether or not non-standard port numbers are used in known_hosts files. |
void |
setPrivateKeyBytes(byte[] privateKeyBytes)
Reads the client's private key from the given byte-array. |
void |
setPrivateKeyFile(java.lang.String privateKeyFileName)
Read the client's private key file, used for client authentication if SSHAuthenticationType.PUBLIC_KEY is being used. |
void |
setPrivateKeyFilePassphrase(java.lang.String privateKeyFilePassphrase)
Set the passphrase for the private key file. |
void |
setPrivateKeyInputStream(java.io.InputStream privateKeyInputStream)
Read the client's private key from the given InputStream. |
void |
setRekeyEnabled(boolean enableRekey)
Set flag to disable or enable re-keying after 1 GB |
void |
setRemoteEOL(java.lang.String remoteEOL)
Set a remoteEOL to be forced, irrespective of what is detected from server information |
void |
setSSHAuthPrompts(SSHAuthPrompt[] authPrompts)
Set the array of authentication prompts that are to be used for keyboard-interactive authentication. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public SSHFTPValidator getSSHServerValidator()
public boolean isDisableWaitForChannelClose()
public void setDisableWaitForChannelClose(boolean disableWaitForChannelClose)
throws FTPException
disableWaitForChannelClose - true to disable the wait
FTPExceptionpublic boolean isRekeyEnabled()
public void setRekeyEnabled(boolean enableRekey)
enableRekey - true to enable, false to disablepublic java.lang.String getPrivateKeyFile()
setPrivateKeyFile was previously called).
The private key is used for client authentication
if SSHAuthenticationType.PUBLIC_KEY is being used.
public void setPrivateKeyFile(java.lang.String privateKeyFileName)
throws FTPException
privateKeyFileName - path to file
FTPException - Thrown if an error occurs while reading the private key.public java.io.InputStream getPrivateKeyInputStream()
public void setPrivateKeyInputStream(java.io.InputStream privateKeyInputStream)
throws FTPException
privateKeyInputStream - InputStream from which the private key can be read
FTPException - Thrown if an error occurs while reading the private key.public byte[] getPrivateKeyBytes()
public void setPrivateKeyBytes(byte[] privateKeyBytes)
throws FTPException
privateKeyBytes - Byte-array containing the client's private key
FTPException - Thrown if an error occurs while parsing the private key.public java.lang.String getPrivateKeyFilePassphrase()
public void setPrivateKeyFilePassphrase(java.lang.String privateKeyFilePassphrase)
throws FTPException
privateKeyFilePassphrase - passphrase to set
FTPExceptionpublic SSHFTPAlgorithm[] getEnabledAlgorithms()
public SSHFTPAlgorithm[] getEnabledAlgorithms(int algorithmType)
throws SSHFTPException
algorithmType - Type of algorithms to return (See SSHFTPAlgorithm).
SSHFTPException - Thrown if the given algorithm-type is invalid.
public void disableAllAlgorithms(int algorithmType)
throws FTPException
algorithmType - Type of algorithms to return (See SSHFTPAlgorithm).
FTPException
public void disableAllAlgorithms()
throws FTPException
FTPException
public void setAlgorithmEnabled(SSHFTPAlgorithm algorithm,
boolean enable)
throws FTPException
algorithm - Algorithm to enable/disable.enable - Flag indicating whether the algorithm should be enabled or disabled.
FTPExceptionpublic int getMaxPacketSize()
public void setMaxPacketSize(int maxPacketSize)
throws FTPException
maxPacketSize - size to set
FTPExceptionpublic SSHAuthenticationType getAuthenticationType()
public void setAuthenticationType(SSHAuthenticationType sshAuthenticationType)
throws FTPException
sshAuthenticationType - authentication type to be used
FTPExceptionpublic SSHAuthPrompt[] getSSHAuthPrompts()
public void setSSHAuthPrompts(SSHAuthPrompt[] authPrompts)
throws FTPException
authPrompts - prompts to set up
FTPExceptionpublic boolean isPortsInKnownHosts()
Default is true.
public void setPortsInKnownHosts(boolean portsInKnownHosts)
throws FTPException
portsInKnownHosts - true to enable, false to disable
FTPException
public void setRemoteEOL(java.lang.String remoteEOL)
throws FTPException
remoteEOL - remoteEOL to force
FTPExceptionpublic java.lang.String getRemoteEOL()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||