Package | Description |
---|---|
com.sshtools.net |
This package contains a set of network utilities for the J2SSH Maverick API.
|
com.sshtools.publickey |
This package contains utility classes for loading/storing public/private keys
and is based on the SSHTools key format architecture.
|
com.sshtools.scp |
This package contains a Secure Copy (SCP) engine suitable for the
lightweight J2SSH Maverick API.
|
com.sshtools.sftp |
The base implementation of the SFTP protocol.
|
com.sshtools.ssh |
This package contains a set of general interface contracts for SSH communication.
|
com.sshtools.ssh.components |
This package contains an abstract cryptographic provider for the SSH protocol.
|
com.sshtools.ssh.components.jce |
This package contains a set of algoritm implementations that enable the Maverick API
to use a Java Cryptography Extension provider.
|
com.sshtools.ssh.message | |
com.sshtools.ssh2 |
This package contains an SSH2 implementation of the
com.sshtools.ssh interfaces.
|
Modifier and Type | Method and Description |
---|---|
void |
ForwardingClient.allowX11Forwarding(String display)
Configure the forwarding client to manage X11 connections.
|
void |
ForwardingClient.allowX11Forwarding(String display,
File f)
Configure the forwarding client to manage X11 connections.
|
void |
ForwardingClient.allowX11Forwarding(String display,
String magicCookie)
Configure the forwarding client to manage X11 connections.
|
void |
ForwardingClient.cancelAllRemoteForwarding()
Stop all remote forwarding
|
void |
ForwardingClient.cancelAllRemoteForwarding(boolean killActiveTunnels)
Stop all remote forwarding.
|
void |
ForwardingClient.cancelRemoteForwarding(String bindAddress,
int bindPort)
Requests that the remote side stop listening for socket connections.
|
void |
ForwardingClient.cancelRemoteForwarding(String bindAddress,
int bindPort,
boolean killActiveTunnels)
Requests that the remote side stop listening for socket connections.
|
SshTransport |
ForwardingClient.ForwardingListener.createConnection(String hostToConnect,
int portToConnect) |
void |
ForwardingClient.exit() |
boolean |
ForwardingClient.requestRemoteForwarding(String addressToBind,
int portToBind,
String hostToConnect,
int portToConnect)
Requests that the remote side start listening for socket connections so
that they may be forwarded to to the local destination.
|
void |
ForwardingClient.SocketListener.start() |
void |
ForwardingClient.startLocalForwarding(String addressToBind,
int portToBind,
String hostToConnect,
int portToConnect)
Start's a local listening socket and forwards any connections made to the
to the remote side.
|
int |
ForwardingClient.startLocalForwardingOnRandomPort(String addressToBind,
int maxFailedPorts,
String hostToConnect,
int portToConnect)
Start's a local listening socket and forwards any connections made to the
to the remote side.
|
void |
ForwardingClient.stopAllLocalForwarding()
Stop all local forwarding
|
void |
ForwardingClient.stopAllLocalForwarding(boolean killActiveTunnels)
Stop all local forwarding
|
void |
ForwardingClient.stopLocalForwarding(String key,
boolean killActiveTunnels)
Stop a local listening socket from accepting connections.
|
void |
ForwardingClient.stopLocalForwarding(String bindAddress,
int bindPort)
Stops a local listening socket from accepting connections.
|
void |
ForwardingClient.stopLocalForwarding(String bindAddress,
int bindPort,
boolean killActiveTunnels)
Stops a local listening socket from accepting connections.
|
Modifier and Type | Method and Description |
---|---|
void |
PublicKeySubsystem.add(SshPublicKey key,
String comment)
Add a public key to the users list of acceptable keys.
|
void |
AbstractKnownHostsKeyVerification.allowHost(String host,
SshPublicKey pk,
boolean always)
Allows a host key, optionally recording the key to the known_hosts file.
|
void |
PublicKeySubsystem.associateCommand(SshPublicKey key,
String command)
Associate a command with an accepted public key.
|
static SshKeyPair |
SshKeyPairGenerator.generateKeyPair(String algorithm,
int bits)
Generates a new key pair.
|
SshPublicKey[] |
PublicKeySubsystem.list()
List all of the users acceptable keys.
|
abstract void |
AbstractKnownHostsKeyVerification.onHostKeyMismatch(String host,
SshPublicKey allowedHostKey,
SshPublicKey actualHostKey)
Called by the
verifyHost method when the host key supplied
by the host does not match the current key recording in the known hosts
file. |
protected void |
ConsoleKnownHostsKeyVerification.onInvalidHostEntry(String entry) |
protected void |
AbstractKnownHostsKeyVerification.onInvalidHostEntry(String entry) |
abstract void |
AbstractKnownHostsKeyVerification.onUnknownHost(String host,
SshPublicKey key)
Called by the
verifyHost method when the host key supplied
is not recorded in the known_hosts file. |
void |
PublicKeySubsystem.remove(SshPublicKey key)
Remove a public key from the users list of acceptable keys.
|
boolean |
AbstractKnownHostsKeyVerification.verifyHost(String host,
SshPublicKey pk)
Verifies a host key against the list of known_hosts.
|
Constructor and Description |
---|
AbstractKnownHostsKeyVerification()
Construct a known_hosts database based on the default path of
~/.ssh/known_hosts.
|
AbstractKnownHostsKeyVerification(String knownhosts)
Constructs a known_hosts database based on the path provided.
|
ConsoleKnownHostsKeyVerification()
Constructs the verification instance with the default known_hosts file
from $HOME/.ssh/known_hosts.
|
ConsoleKnownHostsKeyVerification(String knownhosts)
Constructs the verification instance with the specified known_hosts file.
|
PublicKeySubsystem(Ssh2Session session) |
Modifier and Type | Method and Description |
---|---|
void |
ScpClientIO.ScpEngineIO.close()
Close the SCP engine and underlying session.
|
void |
ScpClient.exit() |
InputStream |
ScpClientIO.get(String remoteFile)
Gets a remote file as a
java.io.InputStream . |
InputStream |
ScpClientIO.get(String remoteFile,
FileTransferProgress progress)
Gets a remote file as a
java.io.InputStream . |
void |
ScpClient.get(String localDir,
String[] remoteFiles,
boolean recursive)
Downloads an array of remote files to the local computer.
|
void |
ScpClient.get(String localFile,
String[] remoteFiles,
boolean recursive,
FileTransferProgress progress) |
void |
ScpClient.get(String localFile,
String remoteFile,
boolean recursive)
Downloads a remote file onto the local computer.
|
void |
ScpClient.get(String localFile,
String remoteFile,
boolean recursive,
FileTransferProgress progress) |
void |
ScpClientIO.put(InputStream in,
long length,
String localFile,
String remoteFile)
Uploads a
java.io.InputStream to a remote server as a file. |
void |
ScpClientIO.put(InputStream in,
long length,
String localFile,
String remoteFile,
FileTransferProgress progress)
Uploads a
java.io.InputStream to a remote server as a file. |
void |
ScpClient.put(String[] localFiles,
String remoteFile,
boolean recursive)
Uploads an array of local files onto the remote server.
|
void |
ScpClient.put(String[] localFiles,
String remoteFile,
boolean recursive,
FileTransferProgress progress)
Uploads an array of local files onto the remote server.
|
void |
ScpClient.put(String localFile,
String remoteFile,
boolean recursive)
Uploads a local file onto the remote server.
|
void |
ScpClient.put(String localFileRegExp,
String remoteFile,
boolean recursive,
FileTransferProgress progress)
pattern matches the files in the local directory using "local" as a glob
Regular Expression.
|
void |
ScpClient.putFile(String localFile,
String remoteFile,
boolean recursive,
FileTransferProgress progress,
boolean remoteIsDir) |
Constructor and Description |
---|
ScpClient.ScpEngine(String cmd,
SshSession session)
Contruct the channel with the specified scp command.
|
ScpClientIO.ScpEngineIO(String cmd,
SshSession session)
Contruct the channel with the specified scp command.
|
Modifier and Type | Method and Description |
---|---|
boolean |
SftpFile.canRead()
Determine whether the user has read access to the file.
|
boolean |
SftpFile.canWrite()
Determine whether the user has write access to the file.
|
void |
SftpClient.cd(String dir)
Changes the working directory on the remote server, or the user's default
directory if
null or any empty string is provided as the
directory path. |
void |
SftpClient.cdup()
Change the working directory to the parent directory
|
void |
SftpSubsystemChannel.changePermissions(SftpFile file,
int permissions)
Change the permissions of a file.
|
void |
SftpSubsystemChannel.changePermissions(String filename,
int permissions)
Change the permissions of a file.
|
void |
SftpSubsystemChannel.changePermissions(String filename,
String permissions)
Change the permissions of a file.
|
void |
SftpClient.chgrp(String gid,
String path)
Sets the group ID for the file or directory.
|
void |
SftpClient.chmod(int permissions,
String path)
Changes the access permissions or modes of the specified file or
directory.
|
void |
SftpClient.chown(String uid,
String path)
Sets the user ID to owner for the file or directory.
|
void |
SftpFile.close()
Close the file.
|
void |
SftpSubsystemChannel.closeFile(SftpFile file)
Close a file or directory.
|
DirectoryOperation |
SftpClient.copyLocalDirectory(String localdir,
String remotedir,
boolean recurse,
boolean sync,
boolean commit,
FileTransferProgress progress)
Copy the contents of a local directory into a remote directory.
|
DirectoryOperation |
SftpClient.copyRemoteDirectory(String remotedir,
String localdir,
boolean recurse,
boolean sync,
boolean commit,
FileTransferProgress progress)
Copy the contents of a remote directory to a local directory
|
void |
SftpSubsystemChannel.createSymbolicLink(String targetpath,
String linkpath)
Create a symbolic link.
|
void |
SftpFile.delete()
Delete this file/directory from the remote server.
|
void |
SftpClient.exit()
Close the SFTP client.
|
static String |
SftpClient.formatLongname(SftpFile file)
Format a String with the details of the file.
|
SftpFileAttributes |
SftpClient.get(String path)
Download the remote file to the local computer
|
SftpFileAttributes |
SftpClient.get(String path,
boolean resume)
Download the remote file to the local computer
|
SftpFileAttributes |
SftpClient.get(String path,
FileTransferProgress progress)
Download the remote file to the local computer.
|
SftpFileAttributes |
SftpClient.get(String path,
FileTransferProgress progress,
boolean resume)
Download the remote file to the local computer.
|
SftpFileAttributes |
SftpClient.get(String remote,
OutputStream local)
Download the remote file into an OutputStream.
|
SftpFileAttributes |
SftpClient.get(String remote,
OutputStream local,
FileTransferProgress progress)
Download the remote file writing it to the specified
OutputStream . |
SftpFileAttributes |
SftpClient.get(String remote,
OutputStream local,
FileTransferProgress progress,
long position)
Download the remote file writing it to the specified
OutputStream . |
SftpFileAttributes |
SftpClient.get(String remote,
OutputStream local,
long position)
Download the remote file into an OutputStream.
|
SftpFileAttributes |
SftpClient.get(String remote,
String local)
Download the remote file into the local file.
|
SftpFileAttributes |
SftpClient.get(String remote,
String local,
boolean resume)
Download the remote file into the local file.
|
SftpFileAttributes |
SftpClient.get(String remote,
String local,
FileTransferProgress progress)
Download the remote file to the local computer.
|
SftpFileAttributes |
SftpClient.get(String remote,
String local,
FileTransferProgress progress,
boolean resume)
Download the remote file to the local computer.
|
String |
SftpSubsystemChannel.getAbsolutePath(SftpFile file)
Get the absolute path of a file.
|
String |
SftpSubsystemChannel.getAbsolutePath(String path)
Get the absolute path of a file.
|
String |
SftpClient.getAbsolutePath(String path)
Get the absolute path for a file.
|
SftpFileAttributes |
SftpFile.getAttributes()
Get the files attributes.
|
SftpFileAttributes |
SftpSubsystemChannel.getAttributes(SftpFile file)
Get the attributes of a file.
|
SftpFileAttributes |
SftpSubsystemChannel.getAttributes(String path)
Get the attributes of a file.
|
protected SftpFileAttributes |
SftpSubsystemChannel.getAttributes(String path,
int messageId) |
String |
SftpSubsystemChannel.getDefaultDirectory()
Gets the users default directory.
|
String |
SftpClient.getDefaultDirectory()
Get the default directory (or HOME directory)
|
SftpFile |
SftpSubsystemChannel.getFile(String path)
Utility method to obtain an
SftpFile instance for a given path. |
SftpFile[] |
SftpClient.getFiles(String remote)
Download the remote files to the local computer
|
SftpFile[] |
SftpClient.getFiles(String remote,
boolean resume)
Download the remote files to the local computer
|
SftpFile[] |
SftpClient.getFiles(String remote,
FileTransferProgress progress)
Download the remote files to the local computer.
|
SftpFile[] |
SftpClient.getFiles(String remote,
FileTransferProgress progress,
boolean resume)
Download the remote files to the local computer.
|
SftpFile[] |
SftpClient.getFiles(String remote,
String local)
Download the remote files into the local file.
|
SftpFile[] |
SftpClient.getFiles(String remote,
String local,
boolean resume)
Download the remote files into the local file.
|
SftpFile[] |
SftpClient.getFiles(String remote,
String local,
FileTransferProgress progress,
boolean resume)
Download the remote file to the local computer.
|
InputStream |
SftpClient.getInputStream(String remotefile)
Create an InputStream for reading a remote file.
|
InputStream |
SftpClient.getInputStream(String remotefile,
long position)
Create an InputStream for reading a remote file.
|
SftpFileAttributes |
SftpSubsystemChannel.getLinkAttributes(String path)
Get the attributes of a file.
|
void |
SftpSubsystemChannel.getOKRequestStatus(UnsignedInteger32 requestId)
Verify that an OK status has been returned for a request id.
|
OutputStream |
SftpClient.getOutputStream(String remotefile)
Create an OutputStream for writing to a remote file.
|
SftpFile |
SftpFile.getParent()
Get the parent of the current file.
|
String |
SftpSubsystemChannel.getSymbolicLinkTarget(String linkpath)
Get the target path of a symbolic link.
|
long |
DirectoryOperation.getTransferSize()
Get the total number of bytes that this operation will transfer
|
void |
SftpSubsystemChannel.initialize()
Initializes the sftp subsystem and negotiates a version with the server.
|
boolean |
SftpFile.isBlock()
Determine whether the file is pointing to a block special file.
|
boolean |
SftpFile.isCharacter()
Determine whether the file is pointing to a character mode device.
|
boolean |
SftpFile.isDirectory()
Determine whether the file object is pointing to a directory.
|
boolean |
SftpClient.isDirectoryOrLinkedDirectory(SftpFile file)
Determine whether the file object is pointing to a symbolic link that is
pointing to a directory.
|
boolean |
SftpFile.isFifo()
Determine whether the file is pointing to a pipe.
|
boolean |
SftpFile.isFile()
Determine whether the file object is pointing to a file.
|
boolean |
SftpFile.isLink()
Determine whether the file object is a symbolic link.
|
boolean |
SftpFile.isSocket()
Determine whether the file is pointing to a socket.
|
int |
SftpSubsystemChannel.listChildren(SftpFile file,
Vector<SftpFile> children)
List the children of a directory.
|
SftpFile[] |
SftpClient.ls()
List the contents of the current remote working directory.
|
SftpFile[] |
SftpClient.ls(String path)
List the contents remote directory.
|
void |
SftpSubsystemChannel.makeDirectory(String path)
Make a directory.
|
void |
SftpSubsystemChannel.makeDirectory(String path,
SftpFileAttributes attrs)
Make a directory.
|
String[] |
RegularExpressionMatching.matchFileNamesWithPattern(File[] files,
String fileNameRegExp)
returns each of the files that match the pattern fileNameRegExp
|
String[] |
Perl5RegExpMatching.matchFileNamesWithPattern(File[] files,
String fileNameRegExp)
compiles fileNameRegExp into a regular expression and pattern matches on
each file's name, and returns those that match.
|
String[] |
NoRegExpMatching.matchFileNamesWithPattern(File[] files,
String fileNameRegExp)
opens and returns the requested filename string
|
String[] |
GlobRegExpMatching.matchFileNamesWithPattern(File[] files,
String fileNameRegExp)
compiles fileNameRegExp into a regular expression and pattern matches on
each file's name, and returns those that match.
|
SftpFile[] |
RegularExpressionMatching.matchFilesWithPattern(SftpFile[] files,
String fileNameRegExp)
returns each of the SftpFiles that match the pattern fileNameRegExp
|
SftpFile[] |
Perl5RegExpMatching.matchFilesWithPattern(SftpFile[] files,
String fileNameRegExp)
compiles fileNameRegExp into a regular expression and pattern matches on
each file's name, and returns those that match.
|
SftpFile[] |
NoRegExpMatching.matchFilesWithPattern(SftpFile[] files,
String fileNameRegExp)
returns files
|
SftpFile[] |
GlobRegExpMatching.matchFilesWithPattern(SftpFile[] files,
String fileNameRegExp)
compiles fileNameRegExp into a regular expression and pattern matches on
each file's name, and returns those that match.
|
SftpFile[] |
SftpClient.matchRemoteFiles(String remote)
Called by getFileMatches() to do regular expression pattern matching on
the files in 'remote''s parent directory.
|
void |
SftpClient.mkdir(String dir)
Creates a new directory on the remote server.
|
void |
SftpClient.mkdirs(String dir)
Create a directory or set of directories.
|
SftpFile |
SftpSubsystemChannel.openDirectory(String path)
Open a directory.
|
SftpFile |
SftpClient.openFile(String fileName) |
SftpFile |
SftpSubsystemChannel.openFile(String absolutePath,
int flags)
Open a file.
|
SftpFile |
SftpSubsystemChannel.openFile(String absolutePath,
int flags,
SftpFileAttributes attrs)
Open a file.
|
void |
SftpSubsystemChannel.performOptimizedRead(byte[] handle,
long length,
int blocksize,
OutputStream out,
int outstandingRequests,
FileTransferProgress progress)
Performs an optimized read of a file through use of asynchronous
messages.
|
void |
SftpSubsystemChannel.performOptimizedRead(byte[] handle,
long length,
int blocksize,
OutputStream out,
int outstandingRequests,
FileTransferProgress progress,
long position)
Performs an optimized read of a file through use of asynchronous
messages.
|
void |
SftpSubsystemChannel.performOptimizedWrite(byte[] handle,
int blocksize,
int outstandingRequests,
InputStream in,
int buffersize,
FileTransferProgress progress)
Performs an optimized write of a file through asynchronous messaging and
through buffering the local file into memory.
|
void |
SftpSubsystemChannel.performOptimizedWrite(byte[] handle,
int blocksize,
int outstandingRequests,
InputStream in,
int buffersize,
FileTransferProgress progress,
long position)
Performs an optimized write of a file through asynchronous messaging and
through buffering the local file into memory.
|
void |
SftpSubsystemChannel.performSynchronousRead(byte[] handle,
int blocksize,
OutputStream out,
FileTransferProgress progress,
long position)
Perform a synchronous read of a file from the remote file system.
|
UnsignedInteger32 |
SftpSubsystemChannel.postReadRequest(byte[] handle,
long offset,
int len)
Post a read request to the server and return the request id; this is used
to optimize file downloads.
|
UnsignedInteger32 |
SftpSubsystemChannel.postWriteRequest(byte[] handle,
long position,
byte[] data,
int off,
int len)
Send a write request for an open file but do not wait for the response
from the server.
|
void |
SftpClient.put(InputStream in,
String remote)
Upload the contents of an InputStream to the remote computer.
|
void |
SftpClient.put(InputStream in,
String remote,
FileTransferProgress progress)
Upload a file to the remote computer reading from the specified
InputStream . |
void |
SftpClient.put(InputStream in,
String remote,
FileTransferProgress progress,
long position) |
void |
SftpClient.put(InputStream in,
String remote,
long position)
Upload the contents of an InputStream to the remote computer.
|
void |
SftpClient.put(String local)
Upload a file to the remote computer
|
void |
SftpClient.put(String local,
boolean resume)
Upload a file to the remote computer
|
void |
SftpClient.put(String local,
FileTransferProgress progress)
Upload a file to the remote computer.
|
void |
SftpClient.put(String local,
FileTransferProgress progress,
boolean resume)
Upload a file to the remote computer.
|
void |
SftpClient.put(String local,
String remote)
Upload a file to the remote computer
|
void |
SftpClient.put(String local,
String remote,
boolean resume)
Upload a file to the remote computer
|
void |
SftpClient.put(String local,
String remote,
FileTransferProgress progress)
Upload a file to the remote computer.
|
void |
SftpClient.put(String local,
String remote,
FileTransferProgress progress,
boolean resume)
Upload a file to the remote computer.
|
void |
SftpClient.putFiles(String local)
Upload the contents of an InputStream to the remote computer.
|
void |
SftpClient.putFiles(String local,
boolean resume)
Upload files to the remote computer
|
void |
SftpClient.putFiles(String local,
FileTransferProgress progress)
Upload files to the remote computer
|
void |
SftpClient.putFiles(String local,
FileTransferProgress progress,
boolean resume)
Upload files to the remote computer
|
void |
SftpClient.putFiles(String local,
String remote)
Upload files to the remote computer
|
void |
SftpClient.putFiles(String local,
String remote,
boolean resume)
Upload files to the remote computer
|
void |
SftpClient.putFiles(String local,
String remote,
FileTransferProgress progress)
Upload files to the remote computer.
|
void |
SftpClient.putFiles(String local,
String remote,
FileTransferProgress progress,
boolean resume)
make local copies of some of the variables, then call putfilematches,
which calls "put" on each file that matches the regexp local.
|
void |
SftpClient.quit()
Close the SFTP client.
|
int |
SftpSubsystemChannel.readFile(byte[] handle,
UnsignedInteger64 offset,
byte[] output,
int off,
int len)
Read a block of data from an open file.
|
void |
SftpSubsystemChannel.recurseMakeDirectory(String path)
Recurse through a hierarchy of directories creating them as necessary.
|
void |
SftpSubsystemChannel.removeDirectory(String path)
Remove an empty directory.
|
void |
SftpSubsystemChannel.removeFile(String filename)
Remove a file.
|
void |
SftpClient.rename(String oldpath,
String newpath)
Rename a file on the remote computer.
|
void |
SftpSubsystemChannel.renameFile(String oldpath,
String newpath)
Rename an existing file.
|
void |
SftpClient.rm(String path)
Remove a file or directory from the remote computer.
|
void |
SftpClient.rm(String path,
boolean force,
boolean recurse)
Remove a file or directory on the remote computer with options to force
deletion of existing files and recursion.
|
SftpMessage |
SftpSubsystemChannel.sendExtensionMessage(String request,
byte[] requestData)
Send an extension message and return the response.
|
void |
SftpSubsystemChannel.setAttributes(SftpFile file,
SftpFileAttributes attrs)
Sets the attributes of a file.
|
void |
SftpSubsystemChannel.setAttributes(String path,
SftpFileAttributes attrs)
Sets the attributes of a file.
|
void |
SftpSubsystemChannel.setCharsetEncoding(String charset)
Allows the default character encoding to be overriden for filename
strings.
|
SftpFileAttributes |
SftpClient.stat(String path)
Returns the attributes of the file from the remote computer.
|
SftpFileAttributes |
SftpClient.statLink(String path)
Returns the attributes of a link on the remote computer.
|
void |
SftpClient.symlink(String path,
String link)
Create a symbolic link on the remote computer.
|
void |
SftpClient.umask(String umask)
Sets the umask for this client.
|
void |
SftpSubsystemChannel.writeFile(byte[] handle,
UnsignedInteger64 offset,
byte[] data,
int off,
int len)
Write a block of data to an open file.
|
Constructor and Description |
---|
SftpClient(SshClient ssh) |
SftpClient(SshClient ssh,
int Max_Version)
Constructs the SFTP client with a given channel event listener.
|
SftpClient(SshSession session) |
SftpClient(SshSession session,
int Max_Version) |
SftpFileInputStream(SftpFile file) |
SftpFileInputStream(SftpFile file,
long position)
Creates a new SftpFileInputStream object.
|
SftpFileOutputStream(SftpFile file)
Creates a new SftpFileOutputStream object.
|
SftpSubsystemChannel(SshSession session) |
SftpSubsystemChannel(SshSession session,
int Max_Version) |
Modifier and Type | Method and Description |
---|---|
SshException |
SshIOException.getRealException()
Get the real exception
|
Modifier and Type | Method and Description |
---|---|
int |
SshClient.authenticate(SshAuthentication auth)
Authenticate the user.
|
boolean |
SshClient.cancelRemoteForwarding(String bindAddress,
int bindPort)
Cancel a forwarding request.
|
void |
SshSession.changeTerminalDimensions(int cols,
int rows,
int width,
int height)
Change the dimensions of the terminal window.
|
void |
SshClient.connect(SshTransport transport,
SshContext context,
SshConnector connector,
String username,
String localIdentification,
String remoteIdentification,
boolean buffered)
Connect to an SSH server.
|
Ssh2Client |
SshConnector.connect(SshTransport transport,
String username)
Create a new connection to an SSH server over the specified transport.
|
SshClient |
SshConnector.connect(SshTransport transport,
String username,
boolean buffered)
See
SshConnector.connect(SshTransport, String) for full details. |
Ssh2Client |
SshConnector.connect(SshTransport transport,
String username,
boolean buffered,
SshContext context)
See
SshConnector.connect(SshTransport, String) for full details. |
SshClient |
SshConnector.connect(SshTransport transport,
String username,
SshContext context)
See
SshConnector.connect(SshTransport, String) for full details. |
SshTransport |
ForwardingRequestListener.createConnection(String hostToConnect,
int portToConnect)
Create a connection to the specified host.
|
static SshConnector |
SshConnector.createInstance()
Returns an instance of the
SshConnector . |
SshClient |
SshClient.duplicate()
Create an identical version of an SshClient using cached authentication
information and the SshTransport duplicate method.
|
void |
SshContext.enableFIPSMode()
Enables FIPS compatible algorithms and disables any other non-compatible
algorithms.
|
void |
SshConnector.enableFIPSMode() |
boolean |
SshSession.executeCommand(String cmd)
Execute a command.
|
String |
CommandExecutor.executeCommand(String cmd)
Deprecated.
|
boolean |
SshSession.executeCommand(String cmd,
String charset)
Execute a command.
|
void |
Client.exit() |
Ssh2Context |
SshConnector.getContext()
Get the configuration context.
|
static String |
SshKeyFingerprint.getFingerprint(byte[] encoded)
Generate an SSH key fingerprint as defined in
draft-ietf-secsh-fingerprint-00.txt.
|
static String |
SshKeyFingerprint.getFingerprint(byte[] encoded,
String algorithm)
Generate an SSH key fingerprint with a specific algorithm.
|
byte[] |
SshContext.getX11AuthenticationCookie()
Get a fake random cookie for X11 authentication
|
byte[] |
SshContext.getX11RealCookie()
Get the real X11 authentication cookie, if not cookie has been set the
fake cookie will be returned.
|
byte[] |
SubsystemChannel.nextMessage()
Read a subsystem message from the channel inputstream.
|
SshTunnel |
SshClient.openForwardingChannel(String hostname,
int port,
String listeningAddress,
int listeningPort,
String originatingHost,
int originatingPort,
SshTransport transport,
ChannelEventListener listener)
Open a TCPIP forwarding channel to the remote computer.
|
SshClient |
SshClient.openRemoteClient(String hostname,
int port,
String username)
Open up an SSH client from the remote machine to another remote server.
|
SshClient |
SshClient.openRemoteClient(String hostname,
int port,
String username,
SshConnector con)
Open up an SSH client from the remote machine to another remote server.
|
SshSession |
SshClient.openSessionChannel()
Open a session on the remote computer.
|
SshSession |
SshClient.openSessionChannel(ChannelEventListener listener)
Open a session on the remote computer.
|
boolean |
SshSession.requestPseudoTerminal(String term,
int cols,
int rows,
int width,
int height)
The remote process may require a pseudo terminal.
|
boolean |
SshSession.requestPseudoTerminal(String term,
int cols,
int rows,
int width,
int height,
byte[] modes)
The remote process may require a pseudo terminal.
|
boolean |
SshSession.requestPseudoTerminal(String term,
int cols,
int rows,
int width,
int height,
PseudoTerminalModes terminalModes)
The remote process may require a pseudo terminal.
|
boolean |
SshClient.requestRemoteForwarding(String bindAddress,
int bindPort,
String hostToConnect,
int portToConnect,
ForwardingRequestListener listener)
Requests that the remote computer accepts socket connections and forward
them to the local computer.
|
protected void |
SubsystemChannel.sendMessage(byte[] msg)
|
protected void |
SubsystemChannel.sendMessage(Packet msg)
Write a subsystem message to the channel outputstream.
|
void |
PseudoTerminalModes.setTerminalMode(int mode,
boolean value)
Set a boolean value mode
|
void |
PseudoTerminalModes.setTerminalMode(int mode,
int value)
Set an integer value mode
|
boolean |
SshSession.startShell()
Start the users default shell.
|
boolean |
HostKeyVerification.verifyHost(String host,
SshPublicKey pk)
Verify that the public key is acceptable for the host.
|
Constructor and Description |
---|
SshIOException(SshException realEx)
Construct the exception with the real exception.
|
Constructor and Description |
---|
CommandExecutor(SshSession session,
String eol,
String promptCmd,
String prompt,
String encoding)
Deprecated.
|
SubsystemChannel(SshChannel channel)
Create a new subsystem channel.
|
Modifier and Type | Method and Description |
---|---|
String |
ComponentFactory.changePositionofAlgorithm(String name,
int position) |
abstract SshDsaPrivateKey |
ComponentManager.createDsaPrivateKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger x,
BigInteger y)
Create an instance of a DSA private key.
|
abstract SshDsaPublicKey |
ComponentManager.createDsaPublicKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger y)
Create an instance of a DSA public key.
|
String |
ComponentFactory.createNewOrdering(int[] ordering) |
abstract SshRsaPrivateCrtKey |
ComponentManager.createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger crtCoefficient)
Create an instance of an RSA co-effecient private key.
|
abstract SshRsaPrivateCrtKey |
ComponentManager.createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger primeExponentP,
BigInteger primeExponentQ,
BigInteger crtCoefficient)
Create an instance of an RSA co-efficent private key.
|
abstract SshRsaPrivateKey |
ComponentManager.createRsaPrivateKey(BigInteger modulus,
BigInteger privateExponent)
Create an instance of an RSA private key.
|
abstract SshRsaPublicKey |
ComponentManager.createRsaPublicKey(BigInteger modulus,
BigInteger publicExponent)
Create an instance of an RSA public key.
|
abstract SshRsaPublicKey |
ComponentManager.createSsh2RsaPublicKey()
Create an instance of an SSH2 RSA public key.
|
BigInteger |
SshRsaPrivateCrtKey.doPrivate(BigInteger input) |
BigInteger |
SshRsaPublicKey.doPublic(BigInteger input) |
abstract SshKeyPair |
ComponentManager.generateDsaKeyPair(int bits)
Generate a new DSA public/private key pair.
|
abstract SshKeyPair |
ComponentManager.generateRsaKeyPair(int bits)
Generate an RSA public/private pair.
|
byte[] |
SshPublicKey.getEncoded()
Encode the public key into a blob of binary data, the encoded result will
be passed into init to recreate the key.
|
String |
SshPublicKey.getFingerprint()
Return an SSH fingerprint of the public key
|
Object |
ComponentFactory.getInstance(String name)
Get a new instance of a supported component.
|
abstract SshSecureRandomGenerator |
ComponentManager.getRND()
Get the secure random number generator.
|
protected void |
ComponentManager.init() |
void |
SshHmac.init(byte[] keydata) |
void |
NoneHmac.init(byte[] keydata) |
void |
SshPublicKey.init(byte[] blob,
int start,
int len)
Initialize the public key from a blob of binary data.
|
void |
SshSecureRandomGenerator.nextBytes(byte[] bytes,
int off,
int len) |
abstract void |
SshKeyExchangeClient.performClientExchange(String clientId,
String serverId,
byte[] clientKexInit,
byte[] serverKexInit)
Override to perform the client side key exchange.
|
boolean |
SshPublicKey.verifySignature(byte[] signature,
byte[] data)
Verify the signature.
|
Modifier and Type | Method and Description |
---|---|
protected void |
DiffieHellmanGroup1Sha1.calculateExchangeHash()
Calculates the exchange hash as an SHA1 hash of the following data.
|
protected void |
DiffieHellmanGroup14Sha1.calculateExchangeHash()
Calculates the exchange hash as an SHA1 hash of the following data.
|
protected void |
DiffieHellmanGroupExchangeSha1.calculateExchangeHash(boolean disableBackwardsCompatibility,
int preferredKeySize)
Calculates the exchange hash as an SHA1 hash of the following data.
|
SshDsaPrivateKey |
JCEComponentManager.createDsaPrivateKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger x,
BigInteger y) |
SshDsaPublicKey |
JCEComponentManager.createDsaPublicKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger y) |
SshRsaPrivateCrtKey |
JCEComponentManager.createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger crtCoefficient) |
SshRsaPrivateCrtKey |
JCEComponentManager.createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger primeExponentP,
BigInteger primeExponentQ,
BigInteger crtCoefficient) |
SshRsaPrivateKey |
JCEComponentManager.createRsaPrivateKey(BigInteger modulus,
BigInteger privateExponent) |
SshRsaPublicKey |
JCEComponentManager.createRsaPublicKey(BigInteger modulus,
BigInteger publicExponent) |
SshRsaPublicKey |
JCEComponentManager.createSsh2RsaPublicKey() |
BigInteger |
Ssh2RsaPrivateCrtKey.doPrivate(BigInteger input) |
BigInteger |
Ssh2RsaPublicKey.doPublic(BigInteger input) |
SshKeyPair |
JCEComponentManager.generateDsaKeyPair(int bits) |
SshKeyPair |
JCEComponentManager.generateRsaKeyPair(int bits) |
byte[] |
SshX509RsaSha1PublicKey.getEncoded()
Encode the public key into a blob of binary data, the encoded result will
be passed into init to recreate the key.
|
byte[] |
SshX509RsaPublicKey.getEncoded()
Encode the public key into a blob of binary data, the encoded result will
be passed into init to recreate the key.
|
byte[] |
SshX509DsaPublicKey.getEncoded()
Encode the public key into a blob of binary data, the encoded result will
be passed into init to recreate the key.
|
byte[] |
Ssh2RsaPublicKey.getEncoded() |
byte[] |
Ssh2DsaPublicKey.getEncoded()
Encode the public key into a blob of binary data, the encoded result will
be passed into init to recreate the key.
|
String |
Ssh2RsaPublicKey.getFingerprint() |
String |
Ssh2DsaPublicKey.getFingerprint() |
SshSecureRandomGenerator |
JCEComponentManager.getRND() |
void |
HmacSha512.init(byte[] keydata) |
void |
HmacSha256.init(byte[] keydata) |
void |
HmacSha196.init(byte[] keydata) |
void |
HmacSha1.init(byte[] keydata) |
void |
AbstractHmac.init(byte[] keydata) |
void |
SshX509RsaSha1PublicKey.init(byte[] blob,
int start,
int len)
Initialize the public key from a blob of binary data.
|
void |
SshX509RsaPublicKey.init(byte[] blob,
int start,
int len)
Initialize the public key from a blob of binary data.
|
void |
SshX509DsaPublicKey.init(byte[] blob,
int start,
int len)
Initialize the public key from a blob of binary data.
|
void |
Ssh2RsaPublicKey.init(byte[] blob,
int start,
int len) |
void |
Ssh2DsaPublicKey.init(byte[] blob,
int start,
int len)
Initialize the public key from a blob of binary data.
|
void |
SecureRND.nextBytes(byte[] bytes,
int off,
int len) |
void |
DiffieHellmanGroupExchangeSha1.performClientExchange(String clientIdentification,
String serverIdentification,
byte[] clientKexInit,
byte[] serverKexInit)
The client requests a modulus from the server indicating the pre- ferred
size.
|
void |
DiffieHellmanGroup1Sha1.performClientExchange(String clientIdentification,
String serverIdentification,
byte[] clientKexInit,
byte[] serverKexInit) |
void |
DiffieHellmanGroup14Sha1.performClientExchange(String clientIdentification,
String serverIdentification,
byte[] clientKexInit,
byte[] serverKexInit) |
boolean |
Ssh2RsaPublicKey.verifySignature(byte[] signature,
byte[] data) |
boolean |
Ssh2DsaPublicKey.verifySignature(byte[] signature,
byte[] data)
Verify the signature.
|
Constructor and Description |
---|
Ssh2DsaPrivateKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger x,
BigInteger y) |
Modifier and Type | Method and Description |
---|---|
protected abstract SshMessage |
SshMessageRouter.createMessage(byte[] msg)
Called by the message routing framework to request the creation of an
SshMessage . |
protected SshMessageStore |
SshAbstractChannel.getMessageStore() |
byte[] |
SshMessageReader.nextMessage() |
SshMessage |
SshMessageStore.nextMessage(MessageObserver observer,
long timeout) |
protected SshMessage |
SshMessageRouter.nextMessage(SshAbstractChannel channel,
MessageObserver observer,
long timeout) |
protected abstract boolean |
SshAbstractChannel.processChannelMessage(SshChannelMessage m) |
protected abstract boolean |
SshMessageRouter.processGlobalMessage(SshMessage msg)
Called by the message routing framework so that the routing
implementation may process a global message.
|
Constructor and Description |
---|
SshChannelMessage(byte[] msg) |
SshChannelMessage(int channelid,
byte[] msg,
int off,
int len) |
Modifier and Type | Method and Description |
---|---|
void |
Ssh2Client.addChannelFactory(ChannelFactory factory)
Installs a custom channel factory so that the client may respond to
channel open requests.
|
void |
Ssh2Client.addRequestHandler(GlobalRequestHandler handler)
Installs a global request handler so that the client may respond to
global requests.
|
int |
AuthenticationProtocol.authenticate(AuthenticationClient auth,
String servicename)
Authenticate using the mechanism provided.
|
void |
Ssh2PublicKeyAuthentication.authenticate(AuthenticationProtocol authentication,
String servicename) |
void |
Ssh2PasswordAuthentication.authenticate(AuthenticationProtocol authentication,
String servicename)
Implementation of the authentication method.
|
void |
Ssh2HostbasedAuthentication.authenticate(AuthenticationProtocol authentication,
String servicename) |
void |
KBIAuthentication.authenticate(AuthenticationProtocol authentication,
String servicename) |
void |
AuthenticationClient.authenticate(AuthenticationProtocol authentication,
String servicename)
Perform the authentication according to the specification.
|
int |
Ssh2Client.authenticate(SshAuthentication auth) |
boolean |
Ssh2Client.cancelRemoteForwarding(String bindAddress,
int bindPort) |
void |
Ssh2Session.changeTerminalDimensions(int cols,
int rows,
int width,
int height) |
protected void |
Ssh2Session.channelRequest(String requesttype,
boolean wantreply,
byte[] requestdata)
This overidden method handles the "exit-status", "exit-signal" and
"xon-xoff" channel requests.
|
protected void |
Ssh2Channel.channelRequest(String requesttype,
boolean wantreply,
byte[] requestdata)
Called when a channel request is received, by default this method sends a
failure message if the remote side requests a reply.
|
void |
Ssh2Client.connect(SshTransport io,
SshContext context,
SshConnector connector,
String username,
String localIdentification,
String remoteIdentification,
boolean buffered) |
Ssh2Channel |
ChannelFactory.createChannel(String channeltype,
byte[] requestdata)
Create an instance of an SSH channel.
|
void |
Ssh2Context.disableCompression() |
SshClient |
Ssh2Client.duplicate() |
void |
Ssh2Context.enableCompression() |
void |
Ssh2Context.enableFIPSMode() |
boolean |
Ssh2Session.executeCommand(String cmd) |
boolean |
Ssh2Session.executeCommand(String cmd,
String charset) |
void |
Ssh2Client.forceKeyExchange()
The SSH transport protocol exchanges keys at the beginning of the
session; the specification recommends that these keys be re-exchanged
after each gigabyte of transmitted data or after each hour of connection
time, whichever comes sooner.
|
String[] |
Ssh2Client.getAuthenticationMethods(String username)
Get a list of authentication methods for the user.
|
String |
AuthenticationProtocol.getAuthenticationMethods(String username,
String servicename)
Get a list of available authentication methods for the user.
|
protected SshMessageStore |
Ssh2Channel.getMessageStore() |
byte[] |
Ssh2Context.getX11AuthenticationCookie() |
byte[] |
Ssh2Context.getX11RealCookie() |
byte[] |
TransportProtocol.nextMessage()
Get the next message.
|
void |
Ssh2Client.openChannel(Ssh2Channel channel,
byte[] requestdata)
Additional method to open a custom SSH2 channel.
|
void |
Ssh2Client.openChannel(SshAbstractChannel channel)
Additional method to open a custom SSH2 channel.
|
SshTunnel |
Ssh2Client.openForwardingChannel(String hostname,
int port,
String listeningAddress,
int listeningPort,
String originatingHost,
int originatingPort,
SshTransport transport,
ChannelEventListener listener) |
SshClient |
Ssh2Client.openRemoteClient(String hostname,
int port,
String username) |
SshClient |
Ssh2Client.openRemoteClient(String hostname,
int port,
String username,
SshConnector con) |
SshSession |
Ssh2Client.openSessionChannel() |
SshSession |
Ssh2Client.openSessionChannel(ChannelEventListener listener) |
SshSession |
Ssh2Client.openSessionChannel(ChannelEventListener listener,
long timeout) |
Ssh2Session |
Ssh2Client.openSessionChannel(int windowspace,
int packetsize,
ChannelEventListener listener)
Additional method to open a session with SSH2 specific features.
|
Ssh2Session |
Ssh2Client.openSessionChannel(int windowspace,
int packetsize,
ChannelEventListener listener,
long timeout) |
SshSession |
Ssh2Client.openSessionChannel(long timeout) |
protected boolean |
Ssh2Channel.processChannelMessage(SshChannelMessage msg)
Processes channel request messages by passing the request through to channelRequest()
.
|
protected void |
Ssh2Session.processExtendedData(int typecode,
int length,
SshChannelMessage msg) |
protected void |
Ssh2Channel.processExtendedData(int typecode,
int length,
SshChannelMessage msg)
Called when extended data arrives.
|
boolean |
GlobalRequestHandler.processGlobalRequest(GlobalRequest request)
Called when a supported global request has been recieved.
|
boolean |
TransportProtocol.processMessage(byte[] msg)
Process a message.
|
protected void |
Ssh2Channel.processStandardData(byte[] buf,
int off,
int len) |
protected void |
Ssh2Channel.processStandardData(int length,
SshChannelMessage msg)
Called when channel data arrives, by default this method makes the data
available in the channels InputStream.
|
byte[] |
AuthenticationProtocol.readMessage()
Read a message from the underlying transport layer.
|
boolean |
Ssh2Session.requestPseudoTerminal(String term,
int cols,
int rows,
int width,
int height) |
boolean |
Ssh2Session.requestPseudoTerminal(String term,
int cols,
int rows,
int width,
int height,
byte[] modes) |
boolean |
Ssh2Session.requestPseudoTerminal(String term,
int cols,
int rows,
int width,
int height,
PseudoTerminalModes terminalModes) |
boolean |
Ssh2Client.requestRemoteForwarding(String bindAddress,
int bindPort,
String hostToConnect,
int portToConnect,
ForwardingRequestListener listener) |
boolean |
Ssh2Client.sendGlobalRequest(GlobalRequest request,
boolean wantreply)
Sends a global request to the remote side.
|
void |
AuthenticationProtocol.sendMessage(byte[] messg) |
void |
TransportProtocol.sendMessage(byte[] msgdata,
boolean isActivity)
Send a transport protocol message.
|
boolean |
Ssh2Channel.sendRequest(String requesttype,
boolean wantreply,
byte[] requestdata)
Sends a channel request.
|
boolean |
Ssh2Channel.sendRequest(String requesttype,
boolean wantreply,
byte[] requestdata,
boolean isActivity)
Sends a channel request.
|
void |
AuthenticationProtocol.sendRequest(String username,
String servicename,
String methodname,
byte[] requestdata)
Send an authentication request.
|
void |
Ssh2Context.setCipherPreferredPositionCS(String name,
int position) |
void |
Ssh2Context.setCipherPreferredPositionSC(String name,
int position) |
boolean |
Ssh2Session.setEnvironmentVariable(String name,
String value)
The SSH2 session supports the setting of environments variables however
in our experiance no server to date allows unconditional setting of
variables.
|
void |
Ssh2Context.setKeyExchangePreferredPosition(String name,
int position) |
void |
Ssh2Context.setMacPreferredPositionCS(String name,
int position) |
void |
Ssh2Context.setMacPreferredPositionSC(String name,
int position) |
void |
Ssh2Context.setPreferredCipherCS(int[] order)
Set the preferred SC cipher order
|
void |
Ssh2Context.setPreferredCipherCS(String name)
Set the preferred cipher for the Client->Server stream.
|
void |
Ssh2Context.setPreferredCipherSC(int[] order)
Set the preferred SC cipher order
|
void |
Ssh2Context.setPreferredCipherSC(String name)
Set the preferred cipher for the Server->Client stream.
|
void |
Ssh2Context.setPreferredCompressionCS(String name)
Set the preferred compression for the Client->Server stream.
|
void |
Ssh2Context.setPreferredCompressionSC(String name)
Set the preferred compression for the Server->Client stream.
|
void |
Ssh2Context.setPreferredKeyExchange(String name)
Set the preferred key exchange method.
|
void |
Ssh2Context.setPreferredMacCS(int[] order)
Set the preferred CS Mac order
|
void |
Ssh2Context.setPreferredMacCS(String name)
Set the preferred mac for the Client->Server stream.
|
void |
Ssh2Context.setPreferredMacSC(int[] order)
Set the preferred SC Mac order
|
void |
Ssh2Context.setPreferredMacSC(String name)
Set the preferred mac for the Server->Client stream.
|
void |
Ssh2Context.setPreferredPublicKey(String name)
Set the preferred public key algorithm.
|
void |
Ssh2Context.setPublicKeyPreferredPosition(String name,
int position) |
byte[] |
SignatureGenerator.sign(SshPublicKey key,
byte[] data)
Sign the data using the private key of the public key provided.
|
void |
Ssh2Session.signal(String signal)
Send a signal to the remote process.
|
void |
TransportProtocol.startService(String servicename)
Request that the remote server starts a transport protocol service.
|
boolean |
Ssh2Session.startShell() |
boolean |
Ssh2Session.startSubsystem(String subsystem)
SSH2 supports special subsystems that are identified by a name rather
than a command string, an example of an SSH2 subsystem is SFTP.
|
void |
TransportProtocol.startTransportProtocol(SshTransport provider,
Ssh2Context context,
String localIdentification,
String remoteIdentification,
Ssh2Client client)
Starts the protocol on the provider.
|
Constructor and Description |
---|
AuthenticationProtocol(TransportProtocol transport)
Construct the protocol using the given transport
|
Ssh2Context()
Contructs a default context
|
Copyright © 2014. All rights reserved.