Skip to main content

sshed

sshed is a minimal paramiko/ssh2 wrapper that makes working with ssh through python just like working with it in normal SSH. It will use your configuration that you have already created first then any extra options can be passed in through the library that is using it. Servers are base objects that can be extended to do other tasks. Also the API is dead simple.

Documentation / Repo Information:

Examples

Creating a server from your ~/.ssh/config with ssh keys created. This also uses a host alias

from sshed import servers
server = servers.from_conf('development')
server.run('whoami').output
>> ['cwood']
server.run('sudo whoami').output
>> ['root']
server.run('cd /var/www').returncode
>> 0
server.run('pwd').output
>> ['/var/www']

Creating a server from just a hostname

from sshed import servers
server = servers.from_conf('myserver.com')
server.run('hostname').output
>> ['myserver.com']

Uploading/Downloading from/to a server

from sshed import servers
server = servers.from_conf('development')
server.upload('/tmp/mytar.tar', '/var/tmp/mytar.tar')
server.download('/var/logs/httpd/error_log', '/tmp/remote/error_log')

Creating a new server without a ssh config

from sshed.servers import Server
server = Server(username='username', hostname='development.mycompany.com',
        password='supersecretpassword')

server.run( ... )

Working with argparse. This sshed module also has a helper for working with argparse. You can import an action so that when a user puts in a --server server.mycompany.com it will create a new server instance for that server.

from sshed.argparse_actions import ServerAction

# some other argparse information
parser.add_argument('-s', '--server', action=ServerAction, dest='server')

Metadata

Release files for sshed 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sshed 0.3.2
File Size Uploaded Provenance Actions
sshed-0.3.2.tar.gz 5.3 kB Without provenance Details for sshed-0.3.2.tar.gz

Release files / sshed-0.3.2.tar.gz

Download URL sshed-0.3.2.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
71694e5f73936ba7b6110f347dce80ccb3575e0eafe8f89a9cdc64fad874d817
BLAKE2b-256 checksum
How to use checksums
5baaedbeabee66c734d74d22697d02513d225ab8499cca9066266c32cce05ea7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for sshed 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page