Visa källa

Mega awesome IRC-tutorial

There are many different ways to connect to our IRC-network. In this tutorial we will focus on using the client WeeChat running in screen

weechat preview

TL;DR

Step one

Please note that while everyone is welcome to connect to our network, these instructions are only intended for students at the IT program (and alumni) and will not work if you do not fulfill these requirements.

In order to login to the screen-server henceforth named Cantina, you need to have an account at chalmers.it

Go to https://account.chalmers.it/ and enter your Chalmers ID (CID) and the corresponding password. If you haven't logged in previously you will be presented with the following page:

auth page

Enter the necessary information and press "Create user"

Step two

A screen is used through a secure socket shell (SSH) connection to our server. Username is your Chalmers ID (cid) and the password you entered in [step one](#Step one)

*nix users

Open a terminal window. In ubuntu as well as OSX the application is called Terminal.

osx spotlight

Enter into the terminal window:

$ ssh CID@irc.chalmers.it

Where CID is replaced by your Chalmers ID

Windows users

If your are using Windows you can download the SSH-client Putty

Putty

A tip: you can enter your CID in the field Auto-login username under Data in order to not have to enter it each time you connect.

Step three

Now that your are connected you are presented with a choice of Client. The recommended choice is number 1, WeeChat in Screen

Now you are running a IRC-client in a Screen and are connected to digIT:s IRC-server.

Common hot-keys

Moving between channels: alt-#, e.g. alt-4 in order to switch to the 4th channel.

If you have 10 or more channels you press: alt-j-##, e.g. alt-j-14

You can use the arrow keys as well, e.g. alt-up or alt-right

If you are using OSX: replace alt with esc

Common IRC-commands

Common channels

Nick registration

Now that you are connected you need to register your nick with nickserv. This allows you exclusive access to your nick and prevents imposters.

In a channel buffer issue:

/query nickserv register <your-secure-password> <your-mail@example.org>

Now, since we are lazy and don't want to identify ourselves everytime we connect to the server, we can use SASL to automatically identify ourselves.

/set irc.server.<your-server-name>.sasl_mechanism plain
/set irc.server.<your-server-name>.sasl_username <your-registered-nick>
/set irc.server.<your-server-name>.sasl_password <your-secure-password>

Note irc.chalmers.it is the default <your-server-name> when connecting to cantina and does not refer to the hostname of the irc server, even though they can be the same. If you have the iset script installed (/script install iset), you can see the available SASL options with /iset sasl

The plain mechanism sends passwords in clear text. However if you are connecting over SSL/TLS (port 9999) the "cleartext" password is still sent over an encrypted channel.

If you are using ZNC then you need to configure SASL there and not in your end client.

Advanced configuration

There be dragons ahead... Continue with caution!

Change your client choice

Quit your screen/client and remove ~/.irkk-choice:

$ rm ~/.irkk-choice
$ irkk

You will now be presented with a new choice of client/multiplexer.

SSH config

If you don't want to enter ssh CID@irc.chalmers.it each time you connect, you can put

host irkk
        hostname irc.chalmers.it
        port 22
        user CID

into ~/.ssh/config

Then you only have to enter ssh irkk

Please note that this does not affect Windows systems

Public key authentication

(*nix only)

If you are tired of entering your password everytime you are accessing the screen, you can use public key authentication

If you don't already have a private/public key pair, you can generate one:

$ ssh-keygen -t rsa -C "your_email@example.com"

Note that you shouldn't enter a password if you want a password-less login (if you are not using a SSH agent that stores your password)

Next you'll need to put your public key on the server. Fortunatly there is a tool for that:

$ ssh-copy-id -i .ssh/id_rsa.pub CID@irc.chalmers.it

Next time you connect you don't have to enter a password. Your user is authenticated using the private key you generated.

ZNC

ZNC is an IRC-bouncer. A tutorial will be written soon...

Login: https://irc.chalmers.it:31337/

Port: 31337

Otherwise the connection information is the same as before.

WeeChat Android

The development version of the WeeChat android client works pretty well over a SSH-tunnel.

This utilises the relay plugin in WeeChat.

Known hosts

If you are using a newer version of weechat-android, you will need to supply the known hosts of the SSH server (cantina.chalmers.it). You can get it by running $ ssh-keyscan cantina.chalmers.it

If you are lazy, you can copy paste it from here (this is insecure and you shouldn't do this):

# cantina.chalmers.it:22 SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.4
cantina.chalmers.it ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAuiQMzRl7l3D8DOOJrZGbwsok7IfxaaHUTl8N8kNNouYVSMkgCg1BJfRdxYb62LUK5C+6qPp7jXqij8xgSFsWSLGpXn9jIcP3ew1s2qkFMfQ8Jrzy4y7lp/b2CGu0sLP8pKbK41jUg7Td6OYf3+EbKp9tprhR90+MA8vukz0ZgtOxi4r9yI7HrIfG6X/ZEJ4bETCEgGo4kQMK7wdLfVCsbq+sNIOm2Q0VBaguw7Lu09rWWgYb6eSYKnGW+CUY3OjfkQutZh63bCGwbkLcmOWMqQ77ZkxVLCJWg/6rVFssNNwfCGHDZgmkMzwqy4C4tcNDe5f+y/g8ZjU4NdsaliWwXQ==

Step 1 - Activate relay plugin

Replace xxxx with a port between 1025 and 65536. Avoid commonly used ports such as the IRC-protocol (6667) etc.

weechat step 1

Step 2 - Choose a relay password

weechat step 2

Step 3 - Set up the Android client

weechat step 3

Use the same port you used in Step 1

weechat step 4

weechat step 5 Connection type should be ssh. Relay password is the pass created in the irc client.

weechat step 6

Common problems

The Diffie-Hellman prime sent by the server is not acceptable (not long enough).

Solution:

/set irc.server.irc.chalmers.it.ssl_dhkey_size 1024
/reconnect

Note This is fixed by generating larger DH-primes on the server and should therefore not happen anymore. If you are still having this problem, please contact digIT