Skip to main content

A wrapper around ssh that can save connections to your ssh config file.

Project description

Slosh

For more information on using and configuring SSH through the SSH config file, check out this helpful guide: Using the SSH Config File.

Installation

$ pip install slosh

Usage

By default slosh is simply a pass-through to the ssh command. So you can run any ssh command normally, using slosh.

$ slosh -i ~/.ssh/mykey.pem ubuntu@1.1.1.1 

Add new connection

To save a connection to the SSH config file add --save-as <host alias> to your connection command. The host alias is how you will reference the connection in the future.

$ slosh -i ~/.ssh/mykey.pem --save-as myserver ubuntu@1.1.1.1 

In the above example we used --save-as myserver to save the connection information to the SSH config file under the alias myserver. This means that we can now run slosh myserver or ssh myserver to connect to the server.

Update connection

Simply use the --save-as option with the host alias of the connection you wish to update. Here we add compression (-C) and change the login username (newuser) of our original connection.

$ slosh -i ~/.ssh/mykey.pem -C --save-as myserver ubuntu@1.1.1.1 

Supported options

The below ssh options are saved to the config. Let me know if you'd like more options to be added.

  • -l <user>: Specifies the username for the connection.
  • -p <port>: Specifies the port number for the connection.
  • -i <identity file>: Specifies the path to the private key file for the connection.
  • -A: Enables forwarding of the authentication agent connection.
  • -C: Requests compression of all data.
  • -v: Increases verbosity. Can be used up to three times (-vvv).

For a comprehensive list of all ssh options and their explanations, you can refer to the official SSH manual page: SSH Manual Page.

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

slosh-0.0.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

slosh-0.0.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file slosh-0.0.1.tar.gz.

File metadata

  • Download URL: slosh-0.0.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.9

File hashes

Hashes for slosh-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a6acacadad3946ec977eb699e6e59068f15d47b2df628e8a2d04112f818e7f82
MD5 b249c57319851f910b2bc9e3d8076a90
BLAKE2b-256 5bf97c373c72fc1eba590abce09f4d843cfa89ec168304c55b02538784bd8e99

See more details on using hashes here.

File details

Details for the file slosh-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: slosh-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.9

File hashes

Hashes for slosh-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 433c3d99db34db320ced519fb15fa4630f41f286cbc6508536595a3fa840527e
MD5 c25fafbc7d383b70efb87e06aedb76ee
BLAKE2b-256 175d04835e265679bf1d59803d5822754b0e5818ae780584892a20f1e8f5865f

See more details on using hashes here.

Supported by

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