linux怎么查看本机内存大小
262
2022-11-20
杨校老师课堂之集群内SSH免密登录功能配置
SSH免密登录功能配置
1. 在主节点虚拟机内进行如下操作:
[root@hadoop1 tmp]# ssh-keygen -t rsaGenerating 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:SHA256:Lr4xmEQSRRyRN2LSirJZYyi0/OdAUhWHzZF8o4ZmHYY root@hadoop1The key's randomart image is:+---[RSA 2048]----+| .=**Boo || ..o*E+B o ||oo++.o+.+ . ||=+=+ + + ||o=+.+ . S ||o + + . || * + . || o + || o. |+----[SHA256]-----+[root@hadoop1 tmp]#
根据提示完成三次回车即可。
2. 切换到 root的家目录下,查看文件
[root@hadoop1 tmp]# cd /root/[root@hadoop1 ~]# ll -a总用量 52dr-xr-x---. 16 root root 4096 3月 23 12:55 .dr-xr-xr-x. 17 root root 224 3月 22 02:19 ..-rw-------. 1 root root 1615 3月 22 02:20 anaconda-ks.cfg-rw-r--r--. 1 root root 18 12月 29 2013 .bash_logout-rw-r--r--. 1 root root 176 12月 29 2013 .bash_profile-rw-r--r--. 1 root root 176 12月 29 2013 .bashrcdrwx------. 14 root root 4096 3月 23 12:56 .cachedrwxr-xr-x. 14 root root 261 3月 23 12:55 .config-rw-r--r--. 1 root root 100 12月 29 2013 .cshrcdrwx------. 3 root root 25 3月 22 03:52 .dbus-rw-------. 1 root root 16 3月 23 12:55 .esd_auth-rw-------. 1 root root 314 3月 23 12:54 .ICEauthority-rw-r--r--. 1 root root 1629 3月 23 13:02 initial-setup-ks.cfgdrwx------. 3 root root 19 3月 23 12:54 .localdrwx------. 5 root root 66 3月 23 12:55 .mozilladrwx------. 2 root root 57 3月 23 13:11 .ssh-rw-r--r--. 1 root root 129 12月 29 2013 .tcshrc-rw-------. 1 root root 2758 3月 23 12:45 .viminfo-rw-------. 1 root root 104 3月 23 2022 .xauth1MBjabdrwxr-xr-x. 2 root root 6 3月 23 12:55 公共drwxr-xr-x. 2 root root 6 3月 23 12:55 模板drwxr-xr-x. 2 root root 6 3月 23 12:55 视频drwxr-xr-x. 2 root root 6 3月 23 12:55 图片drwxr-xr-x. 2 root root 6 3月 23 12:55 文档drwxr-xr-x. 2 root root 6 3月 23 12:55 下载drwxr-xr-x. 2 root root 6 3月 23 12:55 音乐drwxr-xr-x. 2 root root 6 3月 23 12:55 桌面[root@hadoop1 ~]#
进入.ssh目录内查看文件
[root@hadoop1 ~]# cd .ssh/[root@hadoop1 .ssh]# ll -a总用量 16drwx------. 2 root root 57 3月 23 13:11 .dr-xr-x---. 16 root root 4096 3月 23 12:55 ..-rw-------. 1 root root 1675 3月 23 13:11 id_rsa-rw-r--r--. 1 root root 394 3月 23 13:11 id_rsa.pub-rw-r--r--. 1 root root 541 3月 23 12:48 known_hosts
上述查询到的id_rsa就是hadoop1的私钥、id_rsa.pub则是hadoop的公钥
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~