Before this, I logged in to my server via ssh with
> ssh root@server.alifeee.co.uk
root@server.alifeee.co.uk's password:
...
root@chunkifeee:~#
and then I had to type in the password.
This document describes how to setup RSA keys so I can just type ssh server
to login
> ssh server
root@chunkifeee:~#
The name of the key here is "alifeeePC". I do not set a password.
~# ssh-keygen -f ~/.ssh/alifeeePC -C "alifeee's PC"
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/alifeeePC
Your public key has been saved in /root/.ssh/alifeeePC.pub
The key fingerprint is:
...
The key's randomart image is:
...
cat .ssh/alifeeePC.pub >> .ssh/authorized_keys
scp -r root@server.alifeee.co.uk:~/.ssh/alifeeePC C:\Users\alifeee\.ssh
ssh -i C:\Users\alifeee\.ssh\alifeeePC root@server.alifeee.co.uk
Doing this means I can type ssh server
and it basically runs the above command
Add the following to ~/.ssh/config
Host server
HostName server.alifeee.co.uk
User root
IdentityFile ~/.ssh/alifeeePC