liunx普通用户配置免密#yyds干货盘点#

第一步:su 到普通用户下面

su - app(app用户)

[root@localhost ~]# su - wzx

第二步:生成密钥 ssh-keygen -t rsa

[wzx@localhost ~]$ ssh-keygen -t rsa

Generating public/private rsa key pair.

Enter file in which to save the key (/home/wzx/.ssh/id_rsa):

Created directory '/home/wzx/.ssh'.

Enter passphrase (emplinux重启命令ty for no passphrase):

Enterlinux命令 same passphrase again:

Your identilinux是什么操作系统fication has been sa普通用户15次ved in /home/wzx/.ssh/id_rsa.

Your public key has been saved in /home/wzx/.ssh/id_rsa.pub.

The key fingerprint is:

SHA256:ktasuInOq1J3I8/dytNgOgbZ5Ae5NenptbUEfW/tMb4 wzx@localhost.localdomain

The key's randomart image is:

+---[RSA 2048]---linux是什么操作系统-+

| |

| |普通用户的uid是多少

| . . . |

| +++ . . . |

| =+=So . . ..|

| . =o*o* . o o+|

| . ..*.B = + ..oo|

|.. . o*.+ + . ..|

|oo=.o. .oo E.|

+----普通用户的uid是多少[SHA256]-----+

第三步:进入到公钥目录cd ~/.ssh

[wzx@localhost ~]$ cd ~/.ssh/

[wzx@localhost .ssh]$ ls普通用户的uid编号从多少开始

id_rsa id_rsa.pub

第四步:把公钥id_rsa.pub内容复制到另一台普通用户的authorized_keys里面

[wzx@localhost .ssh]$ vlinuxi authorized试看普通用户_keys

[wzx@localhost .ssh]$ cat authorized_keys

ssh-rsa AAAAB3Nz普通用户的uid编号从多少开始aC1yc2EAAAADlinux重启命令AQABAAABAQCqtlinux删除文件命令ZM7MVb2VNfMlinux重启命令cu0oGOtItDWttRnQBImnxaAf9KeSl0JJq+blyWgslF/2zWZXJuBw68AZ944n/EtOegWTe/6ZEUo普通用户15次5B/4Yz2N5MOtRLlGwltj4F+YKnUzlC9vLPlinux常用命令HbpxPo系统/运维qmWlinux命令nO/Cp3rRyYRtOSbGaRbV7PXAaGVIgU6ooeUIhr0Ft普通用户15次2b7VIZK/nDj1+JYCbmz6KB5NDXncQefsjCAX4+orSYTKf/UFbIOz/sAOhDWhxLBIXoGe2qJ6nJaSxtYd5cygI0BXPNl1ZhV2X3U6fuCXYlinux删除文件命令V+uSnUOSuUlinux命令iYlVoOd28AcQad8B0Jlinux必学的60个命令/tKmtO8POp5系统运维工程师obaRhkipxlinux命令IPbxir4XJikNkKef wzx@影院普通用户localhost.localdomain

验证是否系统运维工程师成功

[root@wangzhenxin-lin01 ~]# scp /root/shell/pid.sh app2@172.16.104.59:试看普通用户root

The authenticity of host '172.16.104.59 (172.16.104.59)' can't be established.

ECDSA key fingerprint is SHA256:4O+GhWnNEr0BKLWvjV9tmxBpmxa0Tlinux系统安装j453r4qZ0PO9R0.

ECDlinux常用命令SA key fingerprint is MD5:2b:a8:4f:c6:13:d普通用户非会员试看5:ae:35:97:ac:2c:da:a7:d9:04:35.

Are you sure you want to continue connecting (yes/no)? yes

Warninlinux必学的60个命令g: Permanently added '17linux删除文件命令2.16.104.59' (ECDSA) to the list of known hosts.

app2@172.16.午夜普通用户104.59's普通用户15分钟 password:

p普通用户15分钟id.sh 100% 858 1.1MB/s 00:00

[root@wangzhenxin-lin01 ~]# su - wzx

su: user wzx dlinuxoes春意普通用户 not exist

[root@wangzhenxin-lin01 ~]# ll

总用量 48

-rw-r----- 1 root roo普通用户的uid编号从多少开始t 858 8月 3 17:18 pid.sh