Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

The Atsign Foundation

GitHub License PyPI version SLSA 3

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

Metadata

Release files for sshnpd 0.4.16

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

Source distribution (sdist)

Source distribution for sshnpd 0.4.16
File Size Uploaded Provenance Actions
sshnpd-0.4.16.tar.gz 6.7 kB With provenance Details for sshnpd-0.4.16.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sshnpd 0.4.16
File Interpreter ABI Platform Actions
sshnpd-0.4.16-py3-none-any.whl Python 3 none any Details for sshnpd-0.4.16-py3-none-any.whl

Total release size: 14.3 kB

Release files / sshnpd-0.4.16.tar.gz

Download URL sshnpd-0.4.16.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8a9cd3afb0e3533bb4319d4f88299e668426482fb22e53c11e3f7b41cadfde49
BLAKE2b-256 checksum
How to use checksums
bf32b03cfe7300b0848af840ad62fb36ef8c086cb98930edd9d6e43b2c646727
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 14, 2025.

Transparency log

Release files / sshnpd-0.4.16-py3-none-any.whl

Download URL sshnpd-0.4.16-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40f0c5de4842d77bbda347cc8f6ac0f2724e28c85f58a9c75bf4cdac66d7b272
BLAKE2b-256 checksum
How to use checksums
441c7a6cee8a531400a2fe4126ec20ecf274814897468473562683cabcafc9db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 14, 2025.

Transparency log

Security for sshnpd 0.4.16

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sshnpd-0.4.16.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 14, 2025.

Transparency log

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.

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