From ArchWiki

Some convinience stuff

pacman -S vim screen
pacman -Rs vi
ln -s /usr/bin/vim /usr/bin/vi

Add the following line to ~/.screenrc to allow scrolling:

termcapinfo xterm|xterms|xs|rxvt ti@:te@

Make the server more secure

Use fwbuilder to create a firewall. On the server side, following packages are required:

pacman -S iptables iproute

Might be overkill, is also interesting.

Allow acces only with public key, not password uncomment line in /etc/ssh/sshd_config:

PasswordAuthentication yes


Install small weave server

Activate following configurations in /etc/php/php.ini:

install php-sqlite


pacman -S deluge python-mako

Run once to get standard configuration files:

 /etc/rc.d/deluged start
 /etc/rc.d/deluged stop

Configure Apache reverse proxy to access deluge web ui:

<VirtualHost *:80>
 ProxyPass / http://localhost:8112/


pacman -S git

Make package from aur: and install.

Copy local ssh public key to server

scp .ssh/ myserver:/tmp/

On the server, execute as git user:

gitosis-init < /tmp/

If you get following error:

Authentication refused: bad ownership or modes for directory /srv/gitosis

Change modes:

chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

rotate logs

Crypto Stick

Using the Crypto Stick is very easy. First of all, install pcsclite.

The stick can be tested with:

gpg --card-status

GPG detected the stick and it can be used as described in the GnuPG Smartcard Howto.

However, I had the problem that I already have a key and it is not a RSA key. Thus, it can not be imported to the stick. Therefore, a solution with subkeys is shown in the following section.

Using subkey with the Crypto Stick

Let's assume that the primary (DSA) key has the ID 0x1234ABCD. Furthermore, an ElGamal subkey exists for encryption. Now, we want to add two RSA subkeys: one for encryption and one for signing. So we start the gpg shell with the primary key

gpg --edit-key 0x1234ABCD

With addkey we can add a new subkey and select its type ( 5 - RSA (sign only), 6 - RSA (encrypt only) ). Select a keysize of 1024, so three keys fit on the Crypto Stick.

See section Add subkey for encryption in Ana's blog for more details.

These subkeys have to be copied to the stick as follows:

gpg --edit-key 0x1234ABCD

Select the appropriate subkey and copy it to the stick:

key 1

See the smartcard howto for additional information.

An interesting article on subkeys can be found here.


$ gpg -v --card-status
gpg: enabled debug flags: memstat
gpg: selecting openpgp failed: Card error
gpg: OpenPGP card not available: Card error

Solution: Kill scdaemon