Network-aware SSH config profile selector
Project description
SSH Profile
Network-aware SSH config profile selector
- Created by Scott Karlin
- GitLab: https://gitlab.com/sck
- PyPI: https://pypi.org/user/sckarlin/
- PyPI package: https://pypi.org/project/ssh-profile/
- Free software: MIT License
Features
- Network-aware profile selection -- detect which profile applies on the
current network and use it as an
ssh_configMatch execpredicate. - Four detection tiers, evaluated as a first-match-wins cascade:
hostname,cidr(wired IPv4),gateway_mac, andssid. - Safe by design -- predicate mode is silent on stdout; lenient runtime
loading fails toward the conservative
unknownprofile; a brokenssh-profilefails the connection loudly rather than misconnecting. - Validation built in --
--check-configchecks the profile data file and your~/.ssh/configreferences;--check-toolschecksip/ping/iw. - Fast -- a short-TTL cache speeds up the burst of
ssh-profileinvocations generated by an ssh connection; the initial network detection is shared across the burst. - One shared config across machines: a
~/.ssh/config+ssh-profile.tomlpair, with no per-machine drift.
Documentation
- Live site: https://sck.gitlab.io/ssh-profile/
- Preview locally:
make docs-serve(serves at http://localhost:8000)
API documentation is auto-generated from docstrings.
Development
To set up for local development:
# Clone the repository
git clone git@gitlab.com:sck/ssh-profile.git SSH-Profile
cd SSH-Profile
# Create a virtual environment and install all development dependencies
make venv
source venv/bin/activate
make init
make uv.lock
make sync-devci
Run quality checks (format, lint, type check, test):
make qa
Release cycle
-
Edit code and add change notes to the
Next Release (TBD)entry inHISTORY.mdas you go. -
When ready to release, upgrade all dependencies and refresh the environment:
make update make sync-devci
-
Run the full quality check suite:
make qa -
In
HISTORY.md, replace theNext Release (TBD)heading with the release version and today's date, and verify the change notes are complete. -
Sync the version to
pyproject.tomlanduv.lock:make set-version -
Commit the release:
git commit -am "Release X.Y.Z"
-
Tag and push.
make tagvalidates version consistency acrossHISTORY.md,pyproject.toml, anduv.lock; creates an annotated tag; pushes it toorigin; and adds a newNext Release (TBD)entry toHISTORY.md:make tagPushing the tag triggers the GitLab CI/CD publish job, which uploads the package to your selected registry.
-
Commit to open the next development cycle:
git commit -am "Start next development cycle"
-
Go back to step 1.
See Release Checklist for the full recurring workflow.
Author
SSH Profile was created in 2026 by Scott Karlin.
Built with Cookiecutter and the sck/cookiecutter-pypackage-gitlab project template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ssh_profile-0.1.0.tar.gz.
File metadata
- Download URL: ssh_profile-0.1.0.tar.gz
- Upload date:
- Size: 34.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
326910777548585301a6cb5f7850f29ad1a71989e4634cc164f8a5aaeefc01f1
|
|
| MD5 |
3dde1ce0e2706f9d2579aa5e934904e7
|
|
| BLAKE2b-256 |
b4468590bf0bc850714f9db439b19732633a0b88ad8fcd9f5d13dbcb02669c77
|
File details
Details for the file ssh_profile-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ssh_profile-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1111b705142271715e06825e597e27bf1ce4ed68ad624ff27ee1f944de76c774
|
|
| MD5 |
1ca8c2be2e8493eca1b67d98f648179b
|
|
| BLAKE2b-256 |
c21dbefde0279bb6314ee07fdce65028009c89a19825188e34648185f2e548e7
|