Skip to content
Andrey Petrov edited this page Aug 19, 2016 · 22 revisions

Frequently Answered Questions

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.

How can I build ssh-chat?

You'll need a recent version of the Go compiler (1.7 is best, but 1.5+ should work).

Next you'll need to setup your Go development environment. Check this article for details: How to Write Go Code.

Long story short, something like this:

$ mkdir $HOME/work
$ export GOPATH=$HOME/work  # Add this to your ~/.bashrc or similar
$ go get github.com/shazow/ssh-chat
$ cd $GOPATH/src/github.com/shazow/ssh-chat
$ make

That should make the workspace directory, export the GOPATH to your environment, clone the repository into the workspace, change directory into the code, and run the Makefile instructions for you.

If you have any trouble building, please open an issue on the tracker and let us know what problems you run into during the build process.

How can I contribute to ssh-chat?

So once you've set up the build phase, you can start contributing right away! ssh-chat uses Go, so if you are familiar with C/C++ or Java, Go should be a snap. Check out the following sites for quick insight into the Go language.

Next, before you start committing changes, you will want to create a different branch to work on, and fork ssh-chat so you can create Pull Requests. First create a fork, then we will go over how to create a branch.

Once you've forked ssh-chat, go into your shell and create a new Git branch. Name it something based on what you're adding to the project. Try for simple names like readme-fix or new-themes, something short and easy that describes a feature or addition. Then, you check out into that new branch you made.

$ git checkout -b my-branch-name  # Make a new branch and switch to it

Now you can make your changes. Once you've finished that, you will then have to add these files to be staged for committing. Once added, we can create a commit message, and push it to your fork repository.

$ git add host_test.go  # Add any new files
$ git commit -m "sshchat: Added host tests."

Try to keep commit messages similar to the style the project already uses. Generally we prefix commit titles with the package name or topic of the change to make it easy to convert commit messages into change logs.

Now the changes are ready to be pushed. Currently, Git doesn't know where to push these changes, since we're on a different branch. We need to set a remote that we can push these changes to.

$ git remote add myrepo https://github.com/my-username/ssh-chat
$ git push -u myrepo

That should push your changes to your repository instead of the ssh-chat repository. Now you can create a Pull Request which will compare your changes to the upstream's (original repository) Git, and if the changes are approved by the owner, then they will get merged!

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.

Clone this wiki locally