Changelog
This documents notable changes in LibSSH.jl. The format is based on Keep a Changelog.
Unreleased
Changed
- Made the finalizers for
Session,SshChannel, andSftpSessionslightly more robust. It's still not recommended to rely on them to clean up all resources but in most cases they should be able to do so (#31).
v0.7.1 - 2024-12-06
Added
- Implemented
Base.mkpath(::AbstractString, ::SftpSession)(#30). - Added support for 32-bit platforms, though only Linux is tested with that in CI (#29).
Fixed
v0.7.0 - 2024-10-25
Added
Demo.DemoServernow supports passingallow_auth_none=trueto allow easily setting up passwordless authentication (#28).
Fixed
- Previously the
Demo.DemoServer's command execution implementation would only send the command output after it had finished. Now the output gets sent as soon as it's printed by the command (#28).
Changed
- Breaking:
set_channel_callbacks()will remove any existing callbacks (#28).
v0.6.1 - 2024-10-20
Added
- Added support for setting the file descriptor for a
Sessionduring construction (#21). - Our
Base.run()methods now accept plainStrings as well asCmds (#24). - Implemented convenience
Base.read(::String, ::SftpSession)methods that will take aStringfilename without having to open the file explicitly (#25). - Added support for specifying whether a
Sessionshould use the users SSH config with theprocess_configoption (#25).
Fixed
- Improved handling of possible errors in
Base.readdir()(#20). - Fixed exception handling for
Base.run(), now it throws aSshProcessFailedExceptionorLibSSHExceptionon command failure instead of a plainTaskFailedException(#25).
v0.6.0 - 2024-10-11
Added
- Implemented
Base.readchomp(::Cmd)for remote commands (#12). - Add support for passing environment variables to remote commands with
Base.run(::Cmd)(#12). - Made it possible to assign callbacks to
Callbacks.ServerCallbacksandCallbacks.ChannelCallbacksby property (#14). close(::SshChannel)andclosewrite(::SshChannel)now support anallow_failargument that will print a warning instead of throw an exception if modifying thelib.ssh_channelfails (#16).- Initial SFTP client support (#16, #18, #19).
Fixed
- Fixed segfaults that would occur in
SshChannelwhen itsSessionis disconnected by the remote end (#13). - Fixed some concurrency bugs in the
Demo.DemoServerandSessionEvent(#15). - Fixed a race condition in the
Demo.DemoServerthat could cause segfaults (#16).
Changed
- Breaking:
Sessionnow needs to be closed explictly instead of relying on the finalizer for the memory to be freed.
v0.5.0 - 2024-08-10
Added
- A new
Forwarder(::Session, ::String, ::Int)constructor to allow for forwarding a port to an internal socket instead of to a port (#10).
Changed
- Updated the libssh library to 0.11.0 (#11).
v0.4.0 - 2024-03-12
Added
- A
throwargument topoll_loop()(#9). - Support for some more options in
Session(#9). - A new method for
PKI.get_fingerprint_hash(::PKI.SshKey)to get a public key fingerprint straight from aPKI.SshKey(#9).
Changed
- Some automatically-wrapped low-level functions changed names back to retaining their
ssh_prefixes, and they now have athrowargument to allow disabling throwing an exception upon error (#9). authenticate()will now do host verification as well. This is critical for security so it is strongly recommend that all dependencies update to this release (#9).- All the
throw_on_*arguments in the variousSessionandSshChannelmethods have been renamedthrowfor consistency withBaseand the newthrowarguments in some auto-wrapped bindings (#9).
v0.3.0 - 2024-03-10
Added
- It's possible to set an interface for the
Forwardersocket to listen on with thelocalinterfaceargument (#6). - A new
Gssapimodule to help with GSSAPI support. In particular,Gssapi.principal_name()was added to get the name of the default principal if one is available (#6). - An experimental
authenticate()function to simplify authenticating (#7). - A do-constructor for
Session(::Function)(#8).
Changed
- The
userauth_*functions will now throw aLibSSHExceptionby default if they got aAuthStatus_Errorfrom libssh. This can be disabled by passingthrow_on_error=false(#6). gssapi_available()was renamed toGssapi.isavailable()(#6).userauth_kbdint_getprompts()returns a vector ofKbdintPromptobjects instead of tuples (#7).
Fixed
- Fixed some race conditions in
poll_loop()andForwarder()(#6). Base.run(::Cmd, ::Session)now properly converts commands into strings before executing them remotely, previously things like quotes weren't escaped properly (#6).- Fixed a bug in
Base.run(::Cmd, ::Session)that would clear the output buffer when printing (#6). - Changed
poll_loop()to poll the stdout and stderr streams, which fixes a bug where callbacks would sometimes not get executed even when data was available (#8).
v0.2.1 - 2024-02-27
Added
- Initial client support for GSSAPI authentication (#3). This is not fully tested, so use it with caution.
Changed
- Renamed
channel_send_eof()toclosewrite(::SshChannel)(#4).
Fixed
- An exception in
get_error(::Session)(#5).
v0.2.0 - 2024-02-01
Changed
- The Command execution API was completely rewritten to match Julia's API (#2). This is a breaking change, any code using the old
ssh.execute()will need to be rewritten.
Fixed
- A cause of segfaults was fixed by storing callbacks properly, so they don't get garbage collected accidentally (#2).
v0.1.0 - 2024-01-29
The initial release 🎉 ✨
Added
- Basic client support, and high-level wrappers for some Channel operations.
- A Demo server for testing SSH clients.