标签:公钥私钥认证
A机器到B机器无密
在A机器上操作:
vim ~/.ssh/config
Host 192168
Hostname 192.168.1.2
User root
IdentityFile ~/.ssh/id_rsa
ssh-keygen
cat id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA1Bo9dpBxfTqb4qzJ1K2cZCrc/D43hMV4aeGn7m9Q8LgnDAC+/YJANjJ/TeIPJDOuVAEZD23eoOT1j1EtOJLV5wjr8NLtoT5rJAqelnKfiJiW4BhrimGh5te1BVfTq2OjBIEsg+urfD02CwwvWVjWCo2hBRqnigIm7UnQp9I36ggu1rtko1vvg9E8/gI9IFieZUX4R0YxY/1PHsYhQXdOy0xnJi+e2qGBXCMKELmumPuYZpw+9c/+Yi8Jcj4Xccct4PgQHfa0kICec9CeuYF5P1FRQpp+BcoTUTVs8i39ECJvU0FWddzh4sWTxNW9ZDSQE66387DNelUcBI/Kxm4G8w==
将如下内容复制到B机器上的vim ~/.ssh/authorized_keys里边
在A机器上执行ssh 192168(Host名字)即可无密登录到目标机
本文出自 “追忆_zb” 博客,请务必保留此出处http://zhengbin.blog.51cto.com/2989505/1598026
标签:公钥私钥认证
原文地址:http://zhengbin.blog.51cto.com/2989505/1598026