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.

No comments: