Giter Club home page Giter Club logo

pbssh's Introduction

Passbolt SSH

Python Versions PyPI Total LOC Code style: black License

Disclaimer: This is a community driven project and it is not associated with Passbolt SA.

Consider this situation; you're a system administrator (or just someone with a lot of different hosts with many different passwords) and you need to frequently SSH into a variety of different machines. You store all your passwords in Passbolt, but you hate having to copy/paste passwords all the time. Welcome to pbssh, a thin wrapper on top of SSH which automatically grabs passwords from Passbolt.

Installation

pbssh's only major system dependency (other than Python) is sshpass.

# RHEL/Fedora based
$ sudo dnf install sshpass

# Debian/Ubuntu based
$ sudo apt install sshpass

Assuming you have Python 3.9+ and pip installed already it should be as simple as:

$ pip install pbssh

Usage

Just substitute pbssh wherever you use ssh. On the first run you'll get some instructions on how to set up the configuration file.

After set up, pbssh will attempt to match the username and host specified on the CLI to username and URI entries on a Passbolt entry. If nothing matches, it falls back to normal password authentication. You will be prompted for the GPG key passphrase each time.

In case you want to pass any additional flags to ssh, just include them after the host, for example.

# I want X11 forwarding
$ pbssh root@my-home-server -X

# I just want the hostname (for some reason...)
$ pbssh root@my-home-server hostname

Disclaimer

I wrote this in a day, all in a single session, there are probably edge cases I haven't considered.

License

Refer to LICENSE.

pbssh's People

Contributors

jarulsamy avatar

Stargazers

 avatar

Watchers

 avatar

pbssh's Issues

Silent failure on untrusted host

If a host is being SSH'd into for the first time and prompts for host key trust, pbssh silently fails instead of showing the prompt.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.