Securing and Optimizing Linux: RedHat Edition -A Hands on Guide | ||
---|---|---|
Prev | Chapter 16. Software -Securties(commercial) | Next |
Create your private & public keys of local, by executing:
[root@deep] /#su admin [admin@deep /]$ ssh-keygen2 |
Generating 1024-bit dsa key pair 6 Oo..oOo.oOo. Key generated. 1024-bit dsa, admin@deep.openna.com, Sun Feb 13 2000 05:33:38 -0500 Passphrase : Again : Private key saved to /home/admin/.ssh2/id_dsa_1024_a Public key saved to /home/admin/.ssh2/id_dsa_1024_a.pub |
Create an identification file in your ~/.ssh2 home directory on local:
[admin@deep]$cd ~/.ssh2 [admin@deep ]/.ssh2$echo "IdKey id_dsa_1024_a" > identification |
: It's optional to create an identification file on Remote. The identification file contains the name of the private key that is to be used in authentication.
Copy your public key of Local id_dsa_1024_a.pub to ~/.ssh2 home directory of remote under the name, say, Local.pub.
Create an authorization file in your ~/.ssh2 home directory on remote:
[admin@remote ]/.ssh2$touch authorization |
: The ~/ means the user home directory.
Add the following one line to the authorization file on the remote host:
[admin@remote ]/.ssh2$vi authorization |
key Local.pub |