Skip to main content
Version: 1.1.0 (latest)

common.configuration.specs.sftp_crendentials

SFTPCredentials Objects

@configspec
class SFTPCredentials(CredentialsConfiguration)

[view_source]

Credentials for SFTP filesystem, compatible with fsspec SFTP protocol.

Authentication is attempted in the following order of priority:

- `key_filename` may contain OpenSSH public certificate paths
as well as regular private-key paths; when files ending in `-cert.pub` are found, they are assumed to match
a private key, and both components will be loaded.

- Any key found through an SSH agent: any “id_rsa”, “id_dsa”, or “id_ecdsa” key discoverable in ~/.ssh/.

- Plain username/password authentication, if a password was provided.

- If a private key requires a password to unlock it, and a password is provided, that password will be used to
attempt to unlock the key.

For more information about parameters: https://docs.paramiko.org/en/3.3/api/client.html#paramiko.client.SSHClient.connect

to_fsspec_credentials

def to_fsspec_credentials() -> Dict[str, Any]

[view_source]

Return a dict that can be passed to fsspec SFTP/SSHClient.connect method.

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.