Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 04-10-2009, 08:26 AM   #1
hoctinhoc
Guest
 
Trả Lời: n/a
Keys Authentication!

Keys Authentication!


Configure SSH server to login with Keys Authentication. It is needed for it to make private key for client and public key for server. [1]
Login as a user you'd like to configure for Keys Authentication.

Trích dẫn:

[cent@ns ~]$ ssh-keygen -t rsa

Generating public/private rsa key pair.
Enter file in which to save the key (/home/cent/.ssh/id_rsa):
Created directory '/home/cent/.ssh'.
Enter passphrase (empty for no passphrase): // set any password you like

Enter same passphrase again: // verify


Your identification has been saved in /home/cent/.ssh/id_rsa.
Your public key has been saved in /home/cent/.ssh/id_rsa.pub.
The key fingerprint is:
e0:f7:97:60:a4:06:27:81:42:5b:69:e2:54:50:7b:50 info@quantrinet.com

[cent@ns ~]$ cd .ssh

[cent@ns .ssh]$ mv id_rsa.pub authorized_keys

[cent@ns .ssh]$ chmod 600 authorized_keys

[cent@ns .ssh]$ vi id_rsa


// Copy all in this file like below and Paste into a file on Windows client computer.


-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
*******************************
*******************************
-----END RSA PRIVATE KEY-----

[cent@ns .ssh]$ su -

Password:

[root@ns ~]# vi /etc/ssh/sshd_config


PasswordAuthentication no // line 60: change to 'no'



[root@ns ~]# /etc/rc.d/init.d/sshd restart
[2] Download PuTTYgen and start it on Windows client computer. And next, Click [File]-[Load private key] like below. Then, Choose a file which is private key that you made in section [1]



[3] You need to answer with passphrase for private key which you set in section [1].



[4] Click the button 'Save private key' and Save it in any place you like on your computer.



[5] Start putty and move to 'Auth' section like below. next, Select the private key you saved in previous section.




[6] Back to the 'Session' section and input server's IP address to login.





  Trả lời ngay kèm theo trích dẫn này
Gửi trả lời


Công Cụ
Xếp Bài

Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 09:54 PM. Giờ GMT +7



Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.