To generate a SSH key-pair, use shell command:
More advanced usage would be:
- ssh-keygen -t rsa -N ""
- ssh-keygen -t dsa -N ""
- ssh-keygen -t rsa1 -N ""
SSH Key deployment: After creating the private/public key pairs, deploy the public keys to the ssh server host over a secure channel (e.g. ''scp''):
- scp ~/.ssh/id_rsa.pub user@host:~/.ssh/import.pub
Note: the target directory ''~/.ssh/'' on the remote must exist; ''0700 -rw------- is a good idea!''
Now Log into the remote host and add the copied public key to the authorized_keys file:
- cd ~/.ssh/
- cat import.pub >> auhorized_keys
- chmod 400 authorized_keys