From that page:
The private key is kept on the computer you log in from, while the public key is stored on the .ssh/authorized_keys file on all the computers you want to log in to.
When creating a keyfile using
ssh-keygen, you'll get files named
id_rsa.pub. The first is your private key (possibly password-protected) and should be kept secret all times. You are the client.
The latter is your public key which can be given to the other side, the server. The server can allow multiple public keys. The key files are plaintext files, so you can open them with any text-editor. The public keyfile has just one line, this line should be added to the
~/.ssh/authorized_keys file on the server.
The private and public keys below are generated using
ssh-keygen -t rsa. The previous command created the files
A private key file
~/.ssh/id_rsa looks like:
-----BEGIN RSA PRIVATE KEY-----
...23 lines omitted...
-----END RSA PRIVATE KEY-----
The corresponding public key
~/.ssh/id_rsa.pub looks like:
ssh-rsa AAAAB3NzaC1yc2EA[some chars omitted]X3aKKB6lOyr0v user@host
The first word is either
ssh-rsa (for RSA keys) or
ssh-dss (for DSA keys). The second part (
AAAAB3...r0v) is the actual data.
user@host is just a comment, and could be replaced with anything, like
sysadmin from home.