大佬教程收集整理的这篇文章主要介绍了Linux实用小命令,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
实用key认证
[root@master ~]# ssh-keygen -f /root/.ssh/id_rsa -P '' GeneraTing public/private rsa key pair. 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:bNEK2Pzah70XtL8XQ4oPmw/D0cjzVA8AM8WG0ONB9Ns root@master The key's randomart image is: +---[RSA 2048]----+ | .=*=o | | + .=+o. | | . + ...+. .. | | + oo +o.o.| | S *o+E .| | + o.oB. o | | . o o+=+ o| | . ++.. .| | .....o | +----[SHA256]-----+
[root@master ~]# sshpass -e ssh-copy-id 10.0.24.17 sshpass: -e option given but SSHPASS environment variable not set [root@master ~]# export SSHPASS=root123. [root@master ~]# sshpass -e ssh-copy-id 10.0.24.17 /usr/bin/ssh-copy-id: INFO: source of key(s) to be installed: "/root/.ssh/id_rsa.pub" /usr/bin/ssh-copy-id: INFO: attempTing to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys number of key(s) added: 1 Now try logging into the machine, with: "ssh '10.0.24.17'" and check to @H_817_6@make sure that only the key(s) you wanted were added. [root@master ~]#
以上是大佬教程为你收集整理的Linux实用小命令全部内容,希望文章能够帮你解决Linux实用小命令所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。