Skip to main content

What is PyserSSH

Screenshot 2025-07-06 160010

This library will be Pyserminal (Python Server Terminal) as it supports multiple protocols such as ssh telnet rlogin and mores...

PyserSSH is a free and open-source Python library designed to facilitate the creation of customizable SSH terminal servers. Initially developed for research purposes to address the lack of suitable SSH server libraries in Python, PyserSSH provides a flexible and user-friendly solution for implementing SSH servers, making it easier for developers to handle user interactions and command processing.

The project was started by a solo developer to create a more accessible and flexible tool for managing SSH connections and commands. It offers a simplified API compared to other libraries, such as Paramiko, SSHim, and Twisted, which are either outdated or complex for new users.

This project is part from damp11113-library

Some smail PyserSSH history

PyserSSH version 1.0 (real filename is "test277.py") was created in 2023/9/3 for experimental purposes only. Because I couldn't find the best ssh server library for python and I started this project only for research. But I have time to develop this research into a real library for use. In software or server.

Read full history from docs

Install

Install from pypi

pip install PyserSSH

Install with openRemoDesk protocol

pip install PyserSSH[RemoDesk]

Install from Github

pip install git+https://github.com/damp11113/PyserSSH.git

Install from DPCloudev Git

pip install git+https://git.damp11113.xyz/DPSoftware-Foundation/PyserSSH.git

Quick Example

This Server use port 2222 for default port

from PyserSSH import Server, AccountManager

useraccount = AccountManager(allow_guest=True)
ssh = Server(useraccount)

@ssh.on_user("command")
def command(client, command: str):
    if command == "hello":
        client.send("world!")
        
ssh.run("your private key file")

This example you can connect with ssh admin@localhost -p 2222 and press enter on login If you input hello the response is world

Demo

[!WARNING]
For use in product please generate new private key! If you still use this demo private key maybe your product getting hacked! up to 90%. Please don't use this demo private key for real product.

https://github.com/damp11113/PyserSSH/assets/64675096/49bef3e2-3b15-4b64-b88e-3ca84a955de7

I intend to leaked private key because that key i generated new. I recommend to generate new key if you want to use on your host because that key is for demo only. why i talk about this? because when i push private key into this repo in next 5 min++ i getting new email from GitGuardian. in that email say " GitGuardian has detected the following RSA Private Key exposed within your GitHub account" i dont knows what is GitGuardian and i not install this app into my account.

Metadata

Release files for PyserSSH 6.0

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

Source distribution (sdist)

Source distribution for PyserSSH 6.0
File Size Uploaded
pyserssh-6.0.tar.gz 75.7 kB Details

Release files / pyserssh-6.0.tar.gz

Download URL pyserssh-6.0.tar.gz
Size 75.7 kB
Tags Source
SHA-256 checksum
How to use checksums
adbc5f88eaccb1d50e80ed950e8cc4cb5b565aa43333bee426fec7f013837441
BLAKE2b-256 checksum
How to use checksums
ae626a393be63cfca2fdbb91882b7d28f4327c8841fbcf49fa40c636367d0f83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

This release

6.0 This release

1 release file

5.3

1 release file

5.2

1 release file

5.1.4

1 release file

5.1.3

1 release file

5.1.2

1 release file

5.1.1

1 release file

5.1

1 release file

5.0

1 release file

4.4

1 release file

4.3

1 release file

4.2.1

1 release file

4.0

1 release file

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