Skip to content
Bill Huang edited this page May 24, 2019 · 22 revisions

Frequently Answered Questions

Table of Contents

Is this a replacement for IRC?

It can be for some scenarios, but the goals are not identical.

ssh-chat focuses more on secure chat with small teams. Traditionally to achieve this with IRC, you'd setup an ssh server for your friends and run a localhost IRC server on it that your friends would connect to by tunnelling over ssh. ssh-chat achieves a similar level of security without setting up multiple servers and tunnels.

Building and Contributing

Building ssh-chat and contributing are covered on the Wiki page Contributing to ssh-chat. Check that out for build instructions and contribution basics.

What features are planned for ssh-chat?

Check the milestones page which should have a list of features planned.

How can I click on URLs posted in chat?

Do you have clickable/yankable URL support in your terminal emulator? Depending on your terminal, you might be able to check the settings to see if it has URL support.

Usually it's ctrl+click or cmd+click.

Can I block users from connecting? How do I assign admins?

ssh-chat has whitelisting features which limit access based on ssh public keys. For example, you can whitelist your friends to be the only ones who can connect to the server, or add them to be admins on your server.

You'll need to get your friends' ssh public keys ahead of time and make a file similar to what you'd do on ~/.ssh/authorized_keys for your ssh server, which is one ssh public key per line.

For example, here is how you'd whitelist so that only @shazow can connect to your server:

$ curl https://github.com/shazow.keys >> whitelist_keys
$ ssh-chat --whitelist=$PWD/whitelist_keys ...

Or if you wanted to add everyone who has access to the server as admins:

$ ssh-chat --admin=$HOME/.ssh/authorized_keys ...

How do I add color escape codes to my motd file?

Use an editor that supports ANSI escape codes. For example:

$ printf "\033[91mHello\033[0m world.\n" > motd.txt

Will print "Hello" in red, then "world." in the default color. More about escape codes here.

Shortcuts to insert an Esc code, for commonly used editors (from LinuxQuestions):

If using vi: CTRL+v then Esc

If using emacs: CTRL+q then Esc

If using nano: Esc then v then Esc

Using simply bash: echo -e "\x1b"

How do I install ssh-chat and run it?

There are a few options:

  • If you grabbed the binary releases, extract it and run it from the directory of where it was extracted or move the binary somewhere into your $PATH.

  • If you're compiling it, make build or go build ./cmd/ssh-chat will spit out the binary in the project root directory, so you'll need to ./ssh-chat

  • If you're using go get github.com/shazow/ssh-chat, then the binary will be in your $GOPATH/bin. Add it to your $PATH or use the absolute path.

Once you have ssh-chat, you can read about deploying the server here.