Thursday, February 28, 2008

Passwordless ssh

It becomes a hassle hopping between servers with ssh if you have to type the password each time. To enable passwordless ssh go:

> ssh-keygen -t dsa (ENTER to skip password)
> scp ~/.ssh/id_dsa.pub user@other_server

And on the other server:
> cat ~/id_dsa.pub >> ~/.ssh/authorized_keys
> rm ~/id_dsa.pub

Now you can hop between servers without a password. I only do this for servers that I can afford to be compromised.

Saturday, February 16, 2008

Extracting tar balls

I always forget the flags:

tar -xvvf file.tar
tar -xvvzf file.tar.gz
tar -zxvf file.tgz
tar xjvf file.tar.bz2

Friday, February 15, 2008

Moving and svn repository

To move an svn repository first dump it to a file with:

> svnadmin dump /path/to/repository > svn.dump

Now to create the new repository go:

> svnadmin create new_repository_name
> svnadmin load new_repository_name < svn.dump