Pyfilesystem2 implementation for SSH/SFTP using paramiko
Project description
Requirements
pyfilesystem2 |
|||
six |
|||
paramiko |
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 an 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)
See also
fs, the core pyfilesystem2 library
fs.archive, enhanced archive filesystems for pyfilesystem2
fs.proxy, miscellaneous proxy filesystems for pyfilesystem2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fs.sshfs-0.2.1.tar.gz
.
File metadata
- Download URL: fs.sshfs-0.2.1.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 110d6b8e3f3419d5db6ee108d58f1cd9db69bbd595a88d952502059b701c8387 |
|
MD5 | 15da2fef5b1f834443bab6b33556c4eb |
|
BLAKE2b-256 | 4d1c4a23d672265e0948db0b6a81454072d5b9e9d6d5c651085bafae359cf648 |
Provenance
File details
Details for the file fs.sshfs-0.2.1-py2.py3-none-any.whl
.
File metadata
- Download URL: fs.sshfs-0.2.1-py2.py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f275e10307b1d9f1fc21d806d70f82ca4c476d16c4cb89fd4775a95c1da6f892 |
|
MD5 | e9c849632ff5196d39b27abe4c6226f1 |
|
BLAKE2b-256 | a66145c58b2b2e01f7dd6f95549d8ceb30019692b79d6f8b895b611dcef43de0 |