Skip navigation links

Package com.palantir.giraffe.ssh

Provides SSH access for remote file systems and command execution.

See: Description

Package com.palantir.giraffe.ssh Description

Provides SSH access for remote file systems and command execution.

The SSH implementation is provided by the giraffe-ssh library.

System Lifecycle

Every SSH system is associated with an open, active SSH connection until it is closed. For this reason, systems should always be closed after use. Multiple SSH systems can be open for a given host at the same time, but it is recommended that applications save and share systems to reduce the cost associated with establishing connections. SSH systems are never cached internally and the get methods on system providers always throw exceptions.

System Conversion

FileSystem and ExecutionSystem instances from the SSH provider support upgrades using SystemUpgrader Upgrades systems share a connection with the original system. While closing the upgrades system does not affect the original, any event that corrupts the connection will affect both systems. Changes made by one system are visible to the other system provided the modification happens-before the read. Note that the reverse is not true: detecting a modification does not imply a happens-before relation.

File Attributes

The file system supports basic and posix file attributes. File creation time is not supported: reading it returns the last modified time while setting it throws an exception. User and group principals are represented by their numeric IDs and translation between names and IDs is not supported. If the user or group ID of a file is not available for some reason, the file system returns a principal with ID -1.

Logging

SSH systems log at the debug level for most operations. By default, this uses the com.palantir.giraffe.ssh logger. Users may provide a custom logger by setting the logger key to a valid Logger instance in the environment map used to create new systems.

Log statements are associated with the host of the originating system using the MDC key giraffe-ssh-host. Users are encouraged to include this information when configuring logging.

Skip navigation links