Skip to main content

KeePass SSH Connect

GitHub Actions Workflow Status Codecov GitHub License

A Python utility that helps you securely connect to SSH servers using credentials stored in a KeePass database. This tool provides a convenient way to manage and use your server credentials while keeping them secure.

Features

  • 🔐 Securely store SSH server credentials in KeePass
  • 🚀 Easy command-line interface for server connections
  • 🔍 Flexible server filtering and selection
  • 📋 List and manage server entries
  • 🔑 Support for key files and environment variables

Installation

Install using pip:

pip install keepass-ssh-connect

Prerequisites

  • Python 3.8+
  • KeePass database with SSH server entries
  • Required Python packages (installed automatically):
    • pykeepass
    • paramiko
    • python-dotenv
    • colorama

Usage

Basic Usage

# List all servers
keepass-ssh-connect -l

# Connect to a specific server
keepass-ssh-connect -s "production"

# Specify database and group
keepass-ssh-connect -d /path/to/database.kdbx -g "/Servers/Production"

Full CLI Options

usage: keepass-ssh-connect [-h] [-d DATABASE] [-k KEY_FILE] [-g GROUP] 
                            [-s SERVER] [-l] [-v]

KeePass SSH Connection Utility

optional arguments:
  -h, --help            show this help message and exit
  -d DATABASE, --database DATABASE
                        Path to the KeePass database file
  -k KEY_FILE, --key-file KEY_FILE
                        Path to the KeePass key file (optional)
  -g GROUP, --group GROUP
                        KeePass group path to filter server entries
  -s SERVER, --server SERVER
                        Specific server name or partial match to connect to
  -l, --list            List available servers without connecting
  -v, --verbose         Enable verbose output

Environment Variables

You can also use environment variables for default settings:

  • KEEPASS_DB_PATH: Path to the KeePass database
  • KEEPASS_KEY_PATH: Path to the key file
  • KEEPASS_GROUP_PATH: Default group path for server entries

Local File Discovery

If no database path is specified through command-line parameters or environment variables, the utility will automatically search the current directory for KeePass files:

  • It looks for .kdbx files for the database
  • It looks for .keyx files for the key file

When local files are discovered, the utility will print the paths of the files being used, helping you understand which files are being automatically selected.

Example

# If you have 'mypasswords.kdbx' and 'mykey.keyx' in the current directory
keepass-ssh-connect
# This will print:
# Using local database file: mypasswords.kdbx
# Using local key file: mykey.keyx

Note: Local file discovery provides convenience but should be used carefully to avoid unintended file selection.

Configuration in KeePass

  1. Create a group for SSH servers
  2. For each server, add an entry with:
    • Title: Server name
    • Username: SSH username
    • Password: SSH password
    • URL: Server hostname or IP
    • Notes: Additional connection details

Security

  • Credentials are never stored in plain text
  • Supports KeePass key files for additional security
  • Uses environment variables to avoid hardcoding sensitive information

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Grzes-94

Metadata

Release files for keepass-ssh-connect 0.1.0

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

Source distribution (sdist)

Source distribution for keepass-ssh-connect 0.1.0
File Size Uploaded Provenance Actions
keepass_ssh_connect-0.1.0.tar.gz 7.5 kB Without provenance Details for keepass_ssh_connect-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for keepass-ssh-connect 0.1.0
File Interpreter ABI Platform Actions
keepass_ssh_connect-0.1.0-py3-none-any.whl Python 3 none any Details for keepass_ssh_connect-0.1.0-py3-none-any.whl

Total release size: 17.5 kB

Release files / keepass_ssh_connect-0.1.0.tar.gz

Download URL keepass_ssh_connect-0.1.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d65b229e2be0eb25a306f0fba4414a10b7946541af4a9afab4df1dacd895026f
BLAKE2b-256 checksum
How to use checksums
4ddc59a896fab1cfe7b7ea16a73f58d7b76c5fa56e646569de502138233b8d2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.9.5 Windows/10

Release files / keepass_ssh_connect-0.1.0-py3-none-any.whl

Download URL keepass_ssh_connect-0.1.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a45abfa4f25909cadd71cee7c11cdcd5f7df1a666705af15fbdf0a9909310a9
BLAKE2b-256 checksum
How to use checksums
4d2f00154a70146b5c64a27826e4b2480187549f191e13c03d70282601189429
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.9.5 Windows/10

Security for keepass-ssh-connect 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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