一:環境linux
SecureCRT版本:SecureCRT_5.1.3算法
linux版本:安全
[root@angelT ~]# cat /etc/redhat-release bash
CentOS release 6.4 (Final)ssh
[root@angelT ~]# uname -ride
2.6.32-358.el6.x86_64工具
linux系統的sshd_config配置文件是默認的,沒有任何的修改。測試
二:配置SecureCRT客戶端加密
CRT默認身份驗證第一的是口令驗證,此次咱們測試使用它的密鑰身份驗證。spa
一、選擇工具,建立公鑰
二、選擇RSA加密算法
三、輸入通行短語(登陸時會用到它,就是密碼)
四、我是測試,密鑰長度選擇默認
五、完成,這裏是公鑰和私鑰的地址,是能夠更改的,我默認了。(注:這裏高版本會有選擇openssh格式的,直接選擇這個格式,那麼我下面格式轉換的命令能夠省略了)
六、這裏的全局我選擇了否
三:分發公鑰到linux和linux端的配置
我這裏用了rz命令,將公鑰上傳到了linux端上。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
[root@angelT ~]
# mkdir .ssh
[root@angelT ~]
# chmod 700 .ssh #建立隱藏目錄.ssh,賦予700權限
[root@angelT ~]
# ll -ad .ssh
drwx------. 2 root root 4096 4月 15 02:25 .
ssh
[root@angelT ~]
# mv Identity.pub .ssh
[root@angelT ~]
# cd .ssh
[root@angelT .
ssh
]
# ll
總用量 4
-rw-r--r--. 1 root root 727 4月 14 18:12 Identity.pub
[root@angelT .
ssh
]
# ssh-keygen -i -f Identity.pub >>authorized_keys #個人版本沒有直接能轉換成OpenSSH密鑰格式的選項,因此須要用此命令轉換下 OpenSSH 認的密鑰格式。
[root@angelT .
ssh
]
# chmod 600 authorized_keys #爲了安全,更改其權限爲600
[root@angelT .
ssh
]
# ll authorized_keys
-rw-------. 1 root root 589 4月 15 02:27 authorized_keys
[root@angelT ~]
# /etc/init.d/sshd restart #記得,要重啓下sshd服務
中止 sshd: [肯定]
正在啓動 sshd: [肯定]
|
四:SecureCRT客戶端測試鏈接
選擇公鑰,將公鑰驗證提高到最上面的級別,選擇屬性
選擇使用會話公鑰設置
輸入上面配置的通行短語
OK了,測試成功~~~~進入系統了。。。oye!!!
本文出自 「Chocolee」 博客,請務必保留此出處http://chocolee.blog.51cto.com/8158455/1395618