Python Python Secure Chat with SSH - How?

I am trying to create a secure chat server using python, and after many hours of hunting all I have found is that I have to use SSH and that Paramiko seems to be the best python module for it (maybe I'm wrong) I can’t understand how to implement this, and being completely new to Python, the documents were a little deep for me, especially since I really didn’t know what to look for!

Any links to sample code are welcome, especially regarding the server (it looks like hundreds of examples of connecting to an ssh server, but no one creates them - did I miss something vital here? I heard that it is possible to create an ssh server in python, but the apparent lack of code on the Internet bothers me)

thanks

EDIT:

My ultimate goal is to create a secure chat client with python, and I would like to keep it as simple as possible, however security is the main goal. I saw and made several chat clients in the recent past, but they demanded that telnet connect to them, so they were unsafe, I want to fix it.

+6
source share
2 answers

Try Twisted , an asynchronous network engine written in Python. They have a very simple example: chatserver.py . Get it, and then do SSL listening with a self-signed SSL certificate .

Here is another example .

+5
source

SSH is really not suitable for solving this problem. It is intended for use at the entrance to the server (usually for administration).

As for what would be appropriate, it would completely depend on your requirements, which you did not indicate. WebSockets are likely to be useful if you are after a web chat application.

0
source

All Articles