1. 35

Hey Lobsters!

I wrote a custom SSH server in Go, give it a try. It uses your terminal user and SSH keys to authenticate implicitly. Instead of getting a shell, you get an IRC-style chatroom with everyone else.

$ ssh chat.shazow.net

If you’re getting “Permission denied (publickey)”, please use ssh-keygen to create a keypair. Instructions here: https://help.github.com/articles/generating-ssh-keys/ SSH is a really cool protocol; it’s a lot like HTTP2. This is a demo of one thing you can do with it, but I plan to factor out the code into libraries that will let you build all kinds of experiences that can be used with any SSH client.

The source code is here: https://github.com/shazow/ssh-chat

(Should be reasonably stable and handle thousands of connections, but apologies in advance if it crashes: Try to reconnect in a minute.)

  1. 8

    it’s a lot like HTTP2.

    You take that back. ;)

    SSH has very interesting uses as a metaprotocol, e.g. how git uses it. It provides really powerful security features in a nicely simple-to-use package.

    For people wanting to make a throwaway key (just in case you’re harvesting public keys for some nefarious purpose), you can do it with

    $ ssh-keygen -f /tmp/key.rsa
    $ ssh -i /tmp/key.rsa chat.shazow.net

    FWIW, your fingerprint is (hopefully =P) e5:d5:d1:75:90:38:42:f6:c7:03:d7:d0:56:7d:6a:db, something which would be worth publishing here.

    1. 2

      What I mean to say is, it’s basically better than HTTP2 except for not having virtual hosts. :P

      And my fingerprint is f1:a1:89:6b:87:e9:3b:86:b7:07:4f:cc:08:42:18:7e, but we might change the hashing soon so that’ll change. :)

    2. 2

      lol: https://github.com/shazow/ssh-chat/blob/master/server.go#L61 I love it.

      This is really cool! Thanks for sharing.

      I don’t seem to be able to disconnect gracefully or chat for that matter.

      1. 1

        It’s a terminal app so CTRL+D should let you disconnect, right?

      2. 1

        kudos @shazow, it’s pretty awesome (and neat).

        If someone happens to use a dark Solarized theme on the terminal (as me) /theme mono helps with (somewhat hidden text in) system messages.