commit | 0cf5def7e8f01fefb869b614aa16bf48b8aef818 | [log] [tgz] |
---|---|---|
author | Thomas Wolf <twolf@apache.org> | Sat May 20 19:20:06 2023 +0200 |
committer | Thomas Wolf <twolf@apache.org> | Wed May 24 22:21:32 2023 +0200 |
tree | a53e6d3ba780ad37fb3e1ef8bbad6a51d829ba50 | |
parent | a829d52cf7d2457a9ca3d850106871faf54bc045 [diff] |
[SSHD-1310] SftpFileSystem: do not close user sessions A SftpFileSystem can be obtained in two ways: 1. Via FileSystems.newFileSystem() 2. Via SftpClientFactory.instance().createSftpFileSystem(ClientSession) In the first case, the SftpFileSystemProvider automatically creates a ClientSession, and that session must be closed when the file system closes. In the second case, user code already has a ClientSession and wants to run an SftpFileSystem within. In this case, the session _must not_ be closed when the file system closes. Add a session attribute that can be set on a ClientSession to tell the SftpFileSystem whether it owns the ClientSession. The SftpFileSystem will close only owned sessions. Also add a SessionListener to ensure the file system is closed when the session closes. Bug: https://issues.apache.org/jira/browse/SSHD-1310
Apache MINA SSHD is a 100% pure java library to support the SSH protocols on both the client and server side. It does not aim at being a replacement for the SSH client or SSH server from Unix operating systems, but rather provides support for Java based applications requiring SSH support.
The library can leverage several I/O back-ends:
AsynchronousSocketChannel
s.Bug reports and improvement or feature requests can be filed at the GitHub issue tracker or at the Apache issue tracker.
Sensitive issues such as security vulnerabilities must be reported through private channels, not via either issue tracker.
Java 8+ (as of version 1.3)
The code only requires the core abstract slf4j-api module. The actual implementation of the logging API can be selected from the many existing adaptors.
sshd-common - contains basic classes used throughout the project as well as code that does not require client or server network support.
sshd-core - contains the basic SSH client/server code implementing the connection, transport, channels, forwarding, etc..
sshd-sftp - contains the server side SFTP subsystem and the SFTP client code.
sshd-scp - contains the server side SCP command handler and the SCP client code.
sshd-ldap - contains server-side password and public key authenticators that use an LDAP server.
sshd-git - contains replacements for JGit SSH session factory.
sshd-osgi - contains an artifact that combines sshd-common and sshd-core so it can be deployed in OSGi environments.
sshd-putty - contains code that can parse PUTTY key files.
sshd-openpgp - contains code that can parse OpenPGP key files (with some limitations - see relevant section)
sshd-cli - contains simple templates for command-line client/server - used to provide look-and-feel similar to the Linux ssh/sshd commands.
sshd-contrib - experimental code that is currently under review and may find its way into one of the other artifacts (or become an entirely new artifact - e.g., sshd-putty evolved this way).
Including tests
mvn clean install
Without tests
mvn -Pquick clean install