watch this The wheels are turning, slowly turning. home
Conch 0.6.0 is out 2005-10-24

Twisted Conch is primarily an SSHv2 implementation, but also includes implementations of telnet and vt102. Each protocol comes with client and server implementations, in fact, Conch provides an SSH server right out of the box (configured with Twisted mktap, started with Twisted twistd, key files created with Conch’s ckeygen):

exarkun@boson:~/Scratch/Run/conch$ ssh localhost
ssh: connect to host localhost port 22: Connection refused
exarkun@boson:~/Scratch/Run/conch$ ckeygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/exarkun/.ssh/id_rsa): ssh_host_key
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in ssh_host_key
Your public key has been saved in ssh_host_key.pub
The key fingerprint is:
fa:d7:3e:a3:b3:2b:c9:c2:d5:9b:31:7d:47:3a:96:62
exarkun@boson:~/Scratch/Run/conch$ mktap conch --data .
exarkun@boson:~/Scratch/Run/conch$ sudo twistd -f conch.tap
exarkun@boson:~/Scratch/Run/conch$ ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is fa:d7:3e:a3:b3:2b:c9:c2:d5:9b:31:7d:47:3a:96:62.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
exarkun@boson:~$ ps
  PID TTY          TIME CMD
29747 pts/2    00:00:00 bash
29760 pts/2    00:00:00 ps
exarkun@boson:~$ logout
Connection to localhost closed.
exarkun@boson:~/Scratch/Run/conch$ tail -n 2 twistd.log 
2005/10/24 20:06 EDT [SSHServerTransport,0,127.0.0.1] avatar exarkun logging out (0)
2005/10/24 20:06 EDT [SSHServerTransport,0,127.0.0.1] connection lost
exarkun@boson:~/Scratch/Run/conch$ 




Conch provides APIs for implementing custom SSH servers and clients as well, of course. For example, with it, you can easily write an SSH server that allows logins to a shell other than a unix login shell, such as a control application with a customized interface, or a text adventure game. Insults, a VT102 (plus a bit) implementation, plays a support role here, easing the task of writing custom interfaces by providing terminal and text attribute manipulation functions (eg, moving the cursor around and changing the color of text).



New in this release is an experimental windowing library based on Insults which provides such widgets as TextInput, Button, ScrolledArea, HBox, and VBox. This library can be used to very easily throw together rather complex user interfaces to be exposed, either via SSH or telnet. Those of you who have been following my blog will have seen some screenshots of this library in action.



Grab the 0.6.0 release or visit the project website.