Python implementation of SSH No Ports daemon
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
ARCHIVED - SSHNPD Python (beta)
0.4.16 will be the final release of this package, which is being archived.
Pyhton was chosen to implement a NoPorts daemon that was more portable than the Dart version, but unfortunately the installation footprint was too large for many of the intended devices.
With the production release of the C NoPorts daemon we now recommend that be used for any devices where a small portable implementation is required.
SSH No Ports provides a way to ssh to a remote linux host/device without that device or the client having any open ports (not even 22) on external interfaces. All network connectivity is outbound and there is no need to know the IP address the device has been given. As long as the device and client has an IP address (public or private 1918), DNS and Internet access, you will be able to connect to it.
This version is SSHNP Daemon written in Python, it is still in its beta stage of developement.
Prerequisites
SSHNPD Python requires the following:
- Python 3.10 or later on a system where the following packages containing
native code are available[1]:
- bcrypt
- cffi
- charset-normalizer
- cryptography
- Two atSigns, one for the client and one for the device
- The device atSign keys file should be placed in ~/.atsign/keys
- An sshd bound to (at least) localhost
- Port 22 is the assumed default, but can be overridden
[1] A common problem with installation is that native packages for a given architecture or libc aren't available. Pip will then download the source and try to compile that, which usually fails because the required toolchain isn't present.
Installation
This package can be installed from PyPI with:
pip install sshnpd
Though some systems will need pip3 rather than pip:
pip3 install sshnpd
Python virtual environments (venv)
Recent Linux distributions such as Debian 12 and derivatives (including Ubuntu 24.04 and Rapberry Pi OS 'Bookworm') no longer allow the installation of packages from PyPI into the system Python. It's therefore necessary to use a virtual environment (venv).
First ensure that pip and the venv module are available:
sudo apt install -y python3-pip python3-venv
Then create and activate a venv:
python3 -m venv sshnpd
. sshnpd/bin/activate
The daemon can then be installed as before:
pip install sshnpd
Just remember to activate the venv first whenever using the daemon.
Installing from source
Alternatively clone this repo and from the repo root:
cd packages/python/sshnpd
pip install -r requirements.txt
pip install .
Running the daemon
sshnpd -m @{clientAtsign} -a @{deviceAtsign} -d {deviceName} -u
e.g.
sshnpd -m @zaphod -a @heartofgold -d eddie -u
Connecting to the daemon
The Python version of SSHNPD presently implements v4 functionality, so it's a little behind the Dart implementation, and the latest client needs some flags to ensure compatibility:
sshnp -f @{clientAtsign} -t @{deviceAtsign} -d {deviceName} \
-r @{rvPoint} -u {user} --no-ad --no-et
e.g.
sshnp -f @zaphod -t @heartofgold -d eddie -r @rv_am -u ubuntu --no-ad --no-et
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 sshnpd-0.4.16.tar.gz.
File metadata
- Download URL: sshnpd-0.4.16.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a9cd3afb0e3533bb4319d4f88299e668426482fb22e53c11e3f7b41cadfde49
|
|
| MD5 |
dcb56b86464159222743002f76394ce7
|
|
| BLAKE2b-256 |
bf32b03cfe7300b0848af840ad62fb36ef8c086cb98930edd9d6e43b2c646727
|
Provenance
The following attestation bundles were made for sshnpd-0.4.16.tar.gz:
Publisher:
python-sshnpd-build-publish.yml on atsign-foundation/noports
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sshnpd-0.4.16.tar.gz -
Subject digest:
8a9cd3afb0e3533bb4319d4f88299e668426482fb22e53c11e3f7b41cadfde49 - Sigstore transparency entry: 171328355
- Sigstore integration time:
-
Permalink:
atsign-foundation/noports@8eb71c6b99e791f6f79d0015f88cc250ad59caf9 -
Branch / Tag:
refs/tags/p0.4.16 - Owner: https://github.com/atsign-foundation
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-sshnpd-build-publish.yml@8eb71c6b99e791f6f79d0015f88cc250ad59caf9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sshnpd-0.4.16-py3-none-any.whl.
File metadata
- Download URL: sshnpd-0.4.16-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40f0c5de4842d77bbda347cc8f6ac0f2724e28c85f58a9c75bf4cdac66d7b272
|
|
| MD5 |
e38c7bf4d60c627e86107cf05863cb8c
|
|
| BLAKE2b-256 |
441c7a6cee8a531400a2fe4126ec20ecf274814897468473562683cabcafc9db
|
Provenance
The following attestation bundles were made for sshnpd-0.4.16-py3-none-any.whl:
Publisher:
python-sshnpd-build-publish.yml on atsign-foundation/noports
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sshnpd-0.4.16-py3-none-any.whl -
Subject digest:
40f0c5de4842d77bbda347cc8f6ac0f2724e28c85f58a9c75bf4cdac66d7b272 - Sigstore transparency entry: 171328357
- Sigstore integration time:
-
Permalink:
atsign-foundation/noports@8eb71c6b99e791f6f79d0015f88cc250ad59caf9 -
Branch / Tag:
refs/tags/p0.4.16 - Owner: https://github.com/atsign-foundation
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-sshnpd-build-publish.yml@8eb71c6b99e791f6f79d0015f88cc250ad59caf9 -
Trigger Event:
push
-
Statement type: