Tuesday, April 8, 2014

How to generate key for ssh client and upload into a remote machine

For linux system,
1. cd .ssh
2.ssh-keygen -t rsa -C "your_email@example.com"
3. enter
4. input your passphrase, such as '1111'
5. log in into the remote machine
6. cd .ssh
7. make a file "you_name.pub"
8. vi you_name.pub
9. write in the public key.
10. Add the public key into authorized_keys.
 
For SSH client in windows machines,
 
1. click the menu of SSH client, "Edit".
2. Choose 'settings'
3. click "Keys"
4. click generatekey
5. select rsa
6. export the key file.
7. open the key file.
8. log in into the remote machine 
9. cd .ssh 
10. make a file "you_name.pub"
11. vi you_name.pub 
12. write in the public key. 
13. Add the public key into authorized_keys.
 
Now you should be able to log in the remote machine with your passphrase. 

No comments:

Post a Comment