[root@oracle11g ~]# 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: ef:8f:09:3d:77:6b:bd:74:99:2b:ba:2e:5b:18:21:d8 root@oracle11g The key's randomart image is: +--[ RSA 2048]----+ | | | o | | . E . | | . . | | S. | | oo o| | ..+.. .=.| | +.= oo.+| | .B=+.oo.| +-----------------+ [root@oracle11g ~]# [root@oracle11g ~]# [root@oracle11g ~]# [root@oracle11g ~]# cd .ssh/ [root@oracle11g .ssh]# ls authorized_keys id_rsa id_rsa.pub kNown_hosts [root@oracle11g .ssh]# [root@oracle11g .ssh]# [root@oracle11g .ssh]# [root@oracle11g .ssh]# ssh-copy-id -i [email protected] [email protected]'s password: Now try logging into the machine, with "ssh '[email protected]'", and check in: .ssh/authorized_keys to make sure we haven't added extra keys that you weren't expecting. [root@oracle11g .ssh]# [root@oracle11g .ssh]# [root@oracle11g .ssh]# [root@oracle11g .ssh]# ssh 192.168.162.199 Last login: Fri Jun 17 18:29:42 2022 from oracle11g [root@node01 ~]#
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。