ssh-bastion
SSH proxy server.
Transport ssh connection to other servers.
Based on paramiko👍.
Why
System managers may want to limit access routes to their servers, so this tool can act as a bastion or proxy or whatever-you-call server.
And also if you want the activities of what users did on these servers, the logging function could help.
What can do
- Just works as a normal ssh server.
- Connect to other ssh servers through this tool.
What can not do
- GSSAPI(Kerberos) authentication: Nah...
- Port, X11 or any other forwarding: Not the purpose of this project.
Requirements
- Python: 3.6+
- paramiko
- python-pam
- six (Needed by python-pam😟)
- OS: Linux
- PAM module
- Shell
- OpenSSH-client (for scp)
- OpenSSH-server (for sftp)
Installation
pip install ssh-bastion
Usage
To start the server:
ssh-bastion -s
For more information:
ssh-bastion -h
Login
- As a normal ssh server, you know how to use it.
- As a proxy server:
- Use username like this:
<username of proxy>#<username of target>@<hostname or IP of target>[:<port of target>]-
You need to use "%" to escape "#", "@", "%" in both usernames.
For example:
A%@very%#strange%%username#%#another%%strange%username@192.168.1.100:2222This will connect to
192.168.1.100:2222with user#another%strangeusernamevia userA@very#strange%usernameon proxy server.
-
- Use password like this:
<password of proxy>#<password of target>- Same as username, you need to use "%" to escape "#" in both passwords.
- When use private key authentication, put the key in ~/.ssh, and name it like this:
<username of target>@<hostname or IP of target>[:<port of target>]- Use "%" to escape "@" in username.
- Use username like this:
Still working on😴
- Make command line tool.
Start the server.Set/unset systemd unit file. (Including reload)- Generate default config file.
- Show parsed configuration.
PyPI packaglize.- Private key authentication.
- Logging.
- System log
- DEBUG
- INFO
- WARNING
- ERROR
- CRITICAL
- OFF
- Access log
- DUMP (file)
- INFO
- OFF
- File (transfer) log
- DUMP (file)
- INFO
- OFF
- System log
- Configuration file. (Including accesss control)
Vulnerabilities😴
Not yet, will check after all features are done.
Disclaimer
Use at your own risk.
Metadata
Release files for ssh-bastion 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ssh_bastion-0.1.3.tar.gz | 15.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ssh_bastion-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.1 kB
Release files / ssh_bastion-0.1.3.tar.gz
| Download URL | ssh_bastion-0.1.3.tar.gz |
|---|---|
| Size | 15.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c37fbf2f24c995120d66eb313513f6c78c2f592e7c7500f2f3deec11d4ac35b
|
|
BLAKE2b-256 checksum How to use checksums |
7cb715d820e864cb90613cbfc644f8220695cf78a3cfb9e1b518e0ad148b0986
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / ssh_bastion-0.1.3-py3-none-any.whl
| Download URL | ssh_bastion-0.1.3-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63dc8a8892cd5ca9354432fd9c95f71410bd57afb4ea4e527a4eb430d59f95d5
|
|
BLAKE2b-256 checksum How to use checksums |
411cda1debf3cbc61bca4e97e786a49dcba54a9986043989a3038d8d6575e203
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|