Auto-SSH toolkits with alias-based host management and password encryption
Project description
autossh
Alias-based SSH/SCP toolkit with encrypted password storage.
Wraps ssh/scp via pexpect so you can connect to any host by name without
typing passwords. All passwords are stored AES-256-GCM encrypted in a local
hosts file.
Install
pip install autossh
Python 3.8+ required. Runtime dependencies: pexpect, pyyaml, cryptography.
Quick start
# 1. Open the host file editor (creates the file on first run)
aedit
# 2. Add a host line, save and quit vim:
# 192.168.0.1 root mypassword
# 3. On save, aedit prompts for a master password and encrypts all passwords.
# The master password can be saved to ~/.config/autossh/.env for future use.
# 4. Connect
assh 192.168.0.1
Commands
| Command | Description |
|---|---|
assh <dest> |
SSH to host |
apush <src> <dest>:<path> |
Push local file to remote |
apull <dest>:<path> <dst> |
Pull remote file to local |
acat [dest] |
Print hosts file (passwords decrypted) |
aedit |
Edit hosts file (passwords decrypted in editor, re-encrypted on save) |
amaster init |
Encrypt a plaintext hosts file for the first time |
amaster |
Rekey: re-encrypt all passwords with a new master password |
Run any command with -h for usage details.
Host file format
Each non-comment line:
host[:port][[alias]] user password
Examples:
192.168.0.1 root password1
192.168.0.2:36000 root password2 ## custom port
192.168.0.3[dev3] root password3 ## with alias
192.168.0.4:22[dev4] root password4 ## port + alias
192.168.0.5 None None ## anonymous
host— IP or hostnameport— optional, defaults to 22alias— optional short name forassh <alias>user/password— useNonefor anonymous SSH
Password encryption
Passwords are encrypted with AES-256-GCM using a master password you choose.
The master password is derived into a file key via scrypt and stored in
~/.config/autossh/.env (chmod 0600) so you only type it once per machine.
aedit decrypts passwords in memory (temp file in /dev/shm) so the editor
always shows plaintext; the hosts file on disk always stores ciphertext.
Configuration
Optional config at ~/.config/autossh/config.yaml:
timeout: 30 # pexpect timeout in seconds (default: 30)
host_file: ~/.config/autossh/hosts # override host file path
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
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 autossh_cli-1.6.2.tar.gz.
File metadata
- Download URL: autossh_cli-1.6.2.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a090b125ed4ad2249c4aabf4503551759e7d64c3abd03d1ea63b9612512a026
|
|
| MD5 |
625cd46c78bead83d7dccc7ce1ac8817
|
|
| BLAKE2b-256 |
3cc1a734cff9704099853361cdcf7ed754315a9eac14f6ac4783a36b546b9e2a
|
File details
Details for the file autossh_cli-1.6.2-py3-none-any.whl.
File metadata
- Download URL: autossh_cli-1.6.2-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88db748ac2d275e6f1da508cb696aee716fff0606f3b1d6c9989a9fb71487cd3
|
|
| MD5 |
4305601d6daf69aa63f24bb09f67161f
|
|
| BLAKE2b-256 |
cc4c04e1d6dc39884fb5a028f1c8752ca4048008c0cfafbc1018ac57739c67fb
|