SSH Snippets

Date

26th May 2013

Modified

2020-05-04 20:39

Author

Matthew Tunstall

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

Important

Change permissions on ~/.ssh/authorized_keys for security

$ chmod 700 ~/.ssh

$ chmod 600 ~/.ssh/authorized_keys