系统相关
首页 > 系统相关> > Linux免密配置

Linux免密配置

作者:互联网

[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 root@192.168.162.199
root@192.168.162.199's password:
Now try logging into the machine, with "ssh 'root@192.168.162.199'", 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 ~]#

  

标签:免密,配置,rsa,ssh,key,Linux,root,id,oracle11g
来源: https://www.cnblogs.com/orcl-2018/p/16384984.html