SSH Snippets

To use ssh-copy on a different port:

ssh-copy-id -i ~/.ssh/id_rsa.pub "username@192.168.0.1 -p 1234"

To generate a 4096 bit key:

$ ssh-keygen -b 4096 -t rsa -f $HOME/$HOST-key

Authorised Keys

Change permissions on ~/.ssh/authorized_keys for security
$ chmod 700 ~/.ssh
$ chmod 600 ~/.ssh/authorized_keys