CentOS体系外,正在登录SSH的时分须要暗码登录,其真只有停止简略的配置,便是真现SSH无暗码登录,念要知叙若何配置吗?随小编一同去教习高CentOS真现SSH无暗码登录的要领吧。
1、环境设置
一、效劳端:CentOS release 5.3 IP:222.73.115.198
二、客服端:CentOS release 5.8 IP:192.168.4.244
2、设置SSH无暗码登录须要3步:
一、熟成私钥战公钥
二、导进私钥到认证文件,更改权限
三、测试
3、客户端设置
一、正在客户端熟成公钥取私钥;
# ssh-keygen
[root@jw02 ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): #回车(代表无需暗码登岸)
Enter passphrase (empty for no passphrase): #回车
Enter same passphrase again: #回车
Your identification has been saved in /root/.ssh/id_rsa. #代表公钥
Your public key has been saved in /root/.ssh/id_rsa.pub. #代表私钥
The key fingerprint is:
04:45:0b:47:10:92:0c:b2:b9:d7:11:5b:49:05:e4:d9 root@jw02
[root@jw02 ~]# ls ~/.ssh/
id_rsa id_rsa.pub known_hosts
二、默许正在 ~/.ssh或者/root/.ssh/目次熟成二个文件:
私钥为:id_rsa.pub
公钥为:id_rsa
相关文章