Sunday, November 23, 2008

SSH without password

You can access your remote Linux server over SSH without password. This is faster and some cases prefered way.

The goal is in generating of pair of public-private keys which will authorize your access. You will leave your private key on your local computer (kept in secret) and copy public key to any remote server you want to access. After registering the public key you will be able to access remote server without entering passowrd.

Generate public-private key pair on your local Linux desktop:
$ ssh-keygen -b 2048 -t dsa

Distribute your public key to remote server:
$ scp ~/.ssh/ \

or alternatively you can use:
ssh-copy-id -i ~/.ssh/

Register your public key on your remote server:
$ ssh
$ cat ~/.ssh/ >> ~/.ssh/authorized_keys2

Access your remote server without password:
$ ssh

step by step guide in Czech

No comments: