i just learn how to establish server connect by the secure shell command. the idea is simple.

first in your local PC, use

ssh-keygen -t rsa

to generate a public key and private key under the location ~/.ssh/ . the mode -t is telling the ssh-keygen command for specific encoding method. in this case is the RSA method. then, you will have 2 files under the location ~/.ssh/ with name, for example:

id_rsa
id_rsa.pub

the id_rsa keep on your computer. the id_rsa.pub is the public key. you have to find a way to login to the server and add the context of the public key into “authorized_keys” file, by using command.

cat id_rsa.pub >> authorized_keys

where cat is a command for looking the context.

Advertisements