To access unix ssh server through publickey authentication
1 client SecureCRT
1 generate the public key throughsecureCRT
1.1.1 generate the public and private key
tools à create Public keys
Select RSA key type
Leave the passphrase empty or set it, it is up to you
Set the key length to 1024 or 2048
Creating the key
Create key in openssh format
Rememberthe public and private key are in folder :\users\admin\documents
Publickey Identity.pub, private key Identify
1.2 check the session globalconfiguration
options à global session
1.3 Upload the public key throughscp/ftp/sftp etc to directory $HOME/.ssh
1.4 Add the public toauthorized_keys
cat Identity.pub >> authorized_keys
1.5 ssh to server
2 generate the public key at server side
2.1 generate the key
cd $HOME/.ssh
ssh-keygen
you will see 2 files, id_rsa and id_rsa.pub
2.2 add the public key toauthorized_key
cat id_rsa.pub >> ~/.ssh/authorized_keys
2.3 download the private key toclient side /users/admin
2.4 set the global key todownloaded one
options à global options
2 From linux to linux
1 generate the key at the client
ssh-keygen
2 copy the public key to server
ssh-copy-id username@server
3 ssh from client to server
check the server file ~/.ssh/authorized_key
3 Client putty
1 Generate the key with putty
1.1 Run the puttygen
The quick you move the mouse, the sooner the key generated
Copy the public key and append to authorized_keys
Save the private key
1.2 Start the pageant
Right click the icon of pageant and select the add key
Add the save the private key
1.3 start putty
Input the server ip and user name and click open
2 Generate the key at the server
Download the private key generate by server
PUTTY private key format is different with other, use puttygento convert the format
Open puttygen and load the key downloaded from the server
Save the private key
Right click the pageant and select add key
Open putty and connect the server