Skip to main content

Pyfilesystem2 implementation for SSH/SFTP using paramiko

Project description

Source PyPI Travis Codecov Codacy Format License

Requirements

fs

PyPI fs

Source fs

License fs

paramiko

PyPI paramiko

Source paramiko

License paramiko

six

PyPI six

Source six

License six

Installation

Install directly from PyPI, using pip

pip install fs.sshfs

Usage

Use fs.open_fs to open a filesystem with an SSH FS URL:

import fs
my_fs = fs.open_fs("ssh://user:password@host:port/resource")

with the following optional parts:

  • user: defaults to the current user

  • password: if none provided, passwordless authentification methods are used (either using public keys or no authentification to connect to the host)

  • port: defaults to the usual SSH port (port 22)

  • resource: defaults to the root directory ("/")

For a more granular way of connecting to a SSH server, use the fs.sshfs.SSHFS constructor, which signature is:

from fs.sshfs import SSHFS
my_fs = SSHFS(
  host,            # The name or adress of the SSH server
  user=None,       # an optional username, defaults to the current user
  passwd=None,     # an optional password, not needed if using a public key or
                   #   an SSH server without authentification
  pkey=None,       # a `paramiko.PKey` object, used to connect with a
                   #   specific key (undiscoverable key, etc.)
  timeout=10,      # The timeout of the connection, in seconds
                   #   (None to disable)
  port=22,         # The port to which to connect, default to default SSH port
  keepalive=10,    # The interval of time between keepalive packets, in
                   #    seconds (0 to disable)
  compress=False   # Compress the communications with the server
)

Once created, the SSHFS filesystem behaves like any other filesystem (see the Pyfilesystem2 documentation)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fs.sshfs-0.2.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fs.sshfs-0.2.0-py2.py3-none-any.whl (11.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file fs.sshfs-0.2.0.tar.gz.

File metadata

  • Download URL: fs.sshfs-0.2.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fs.sshfs-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d4ee09a17e9b4be63cea1d03f29bcab16b8e44bcb9698364a7c93267c8ee9342
MD5 4044e9081ee2b915a58d81c3f86943bb
BLAKE2b-256 ec69c7d543954af011399fed52d1f0135cdcfd935f8711e7d80e9ce2a0e2b5b7

See more details on using hashes here.

File details

Details for the file fs.sshfs-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for fs.sshfs-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ec57606a7fd43faf44bbf02df2b78bd57a21eaf49e3bd0e28c5cdc56f6413f3e
MD5 f78ddf0b3d14980afdb78f98bb5bf1d1
BLAKE2b-256 74a3a844f9b26a9102734cc26e32952e60717bacaf05b2d64829eabc7df83c5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page