I try to become warm with paramiko
. As a first use case I would like to connect to a text-based MUD game via SSH. The SSH connection itself works.
But the MUD do present a welcome text and then asks for a user name (on MUD level not SSH).
I don't know how to read that welcome text.
#!/usr/bin/env python3
import paramiko
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect(hostname='fakemud.web', username='fakeuser', password='fakepwd')
print(client)
shell = client.invoke_shell()
I don't know how to read the welcome text and how to type in the username.
I tried with shell.makefile()
and shell.invoke_shell()
and played around with other things I found in the API docs. But I'm stuck.
I'm not sure if I'm on the right track here.