![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
fs.sshfs
PyFilesystem2 | |||
---|---|---|---|
six | |||
paramiko | |||
property-cached |
fs.sshfs
supports all Python versions supported by PyFilesystem2:
Python 2.7, and Python 3.5 onwards. Code should still be compatible with
Python 3.4, but not tested anymore.
Install directly from PyPI, using pip:
$ pip install fs.sshfs
There is also a conda-forge
package available:
$ conda install -c conda-forge fs.sshfs
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]")
The sftp
scheme can be used as an alias for the ssh
scheme in the FS
URL. Additional argument can be passed to the SSHFS
constructor as
percent-encoded URL parameters (excepted policy
). See section below
for a list of all supported arguments.
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, passwd=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 serveruser
: 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.exec_timeout
: the timeout, in seconds, for arbitrary SSH commands on
the server.policy
: a
paramiko.MissingHostKeyPolicy
instance, or None
to use
paramiko.AutoAddPolicy
.Additional keyword arguments will be passed to the underlying
paramiko.SSHClient.connect
call, taking precedence over implicitly derived arguments. Once created, the SSHFS
filesystem behaves like any
other filesystem (see the PyFilesystem2 documentation).
SSHFS.openbin
has the following extra options that can be passed as
keyword arguments to control the file buffering:
prefetch
: enabled by default, use a background thread to prefetch the content
of a file opened in reading mode. Does nothing for files in writing mode.pipelined
: enable pipelined mode, avoid waiting for server answer between
two uploaded chunks. Does nothing for files in reading mode.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.
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.
fs.sshfs
is developed and maintained by:
The following people contributed to fs.sshfs
:
This project obviously owes a lot to the PyFilesystem2 project and all its contributors.
FAQs
Pyfilesystem2 over SSH using paramiko
We found that fs.sshfs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.