Expand description
§faucet-common-sftp
Shared SFTP connection configuration and connect helper for the
faucet-source-sftp and
faucet-sink-sftp connectors.
The single entry point is connect, which opens an SSH transport
(password or private-key auth), verifies the server host key against the
configured HostKeyPolicy, opens the sftp subsystem, and hands back a
ready SftpSession. Both the source and the sink build their session
through this helper so auth, host-key handling, and error mapping stay
consistent.
§Host-key verification
Man-in-the-middle protection is on by default. HostKeyPolicy defaults to
AcceptNew (trust-on-first-use — record an
unknown key, reject a changed one). Strict
requires the key to already be present in known_hosts.
Insecure disables verification entirely and
must be selected explicitly.
§Secrets
SftpAuth has a hand-written Debug impl that never prints the
password or key passphrase, so a Debug-formatted
SftpConnectionConfig is safe to log.
Structs§
- Open
Flags - Opening flags according to the specification
- Sftp
Connection Config - Shared SFTP connection configuration.
- Sftp
Session - High-level SFTP implementation for easy interaction with a remote file system. Contains most methods similar to the native filesystem
Enums§
- Host
KeyPolicy - How the server’s host key is verified during the SSH handshake.
- Sftp
Auth - SFTP authentication method.
Constants§
- DEFAULT_
PORT - Default SSH port.
Functions§
- connect
- Open an SSH transport to the configured server, authenticate, verify the
host key, and open the
sftpsubsystem.