Pyfilesystem2 over SSH using paramiko
Project description
Requirements
pyfilesystem2 |
|||
six |
|||
paramiko |
Installation
Install directly from PyPI, using pip
pip install fs.sshfs
Usage
Opener
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]/[directory]")
Constructor
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, user=None, paswd=None, pkey=None, timeout=10, port=22,
keepalive=10, compress=False, config_path='~/.ssh/config'
)
with each argument explained below:
- host
the name or IP address of the SSH server
- user
the username to connect with, defaults to the current user.
- passwd
an optional password, used to connect directly to the server or to decrypt the public key, if any given.
- pkey
a paramiko.PKey object, a path, or a list of paths to an SSH key.
- timeout
the timeout, in seconds, for networking operations.
- port
the port the SSH server is listening on.
- keepalive
the interval of time between keepalive packets, in seconds. Set to 0 to disable.
- compress
set to True to compress the communications with the server
- config_path
the path to an OpenSSH configuration file.
Once created, the SSHFS filesystem behaves like any other filesystem (see the Pyfilesystem2 documentation).
SSHFS are aware of SSH config files and as such, one of the hosts in the configuration file can be provided as the host argument for the filesystem to connect to the server with the proper configuration values.
Feedback
Found a bug ? Have an enhancement request ? Head over to the GitHub issue tracker of the project if you need to report or ask something. If you are filling in on a bug, please include as much information as you can about the issue, and try to recreate the same bug in a simple, easily reproductible situation.
See also
fs, the core pyfilesystem2 library
fs.archive, enhanced archive filesystems for pyfilesystem2
fs.proxy, miscellaneous proxy filesystems for pyfilesystem2
fs.smbfs, Pyfilesystem2 over SMB using pysmb
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.6.1.tar.gz
.
File metadata
- Download URL: fs.sshfs-0.6.1.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e9f218a382c8a82c9f639d1c0e3a622ed005fed03923966621bafbfe0da12f4 |
|
MD5 | 47ff5f4663d82e85a3360e7662a7d366 |
|
BLAKE2b-256 | 6b291df93fbff3f73559b7283181c96218f640e33c07298042a669945d2380c5 |
Provenance
File details
Details for the file fs.sshfs-0.6.1-py2.py3-none-any.whl
.
File metadata
- Download URL: fs.sshfs-0.6.1-py2.py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dc8eaac1c9a1f071f747150d7ae4125b685b417dc97877aa86262aee0b14588 |
|
MD5 | 450d346295f43c5d56629d2c6ac8e6cb |
|
BLAKE2b-256 | 0542267033668f03e3bf4a2e3c82422fb481056fb3b8a2442fad33a2f95cedf5 |