惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - ZY.Zhou

windows10下docker启动失败原因定位 electron工程目录结构 centos7下安装redis集群 MAC精简动画效果 Big Sur dmg镜像制作macos安装盘 WINDOWS下编译BOOST_PYTHON MYSQL单服务器迁移数据到集群 Centos7 解决gcc 4.85版本,升级更改版本gcc ubuntu下载安装文件和依赖包 fortify的linux环境使用步骤 linux top命令VIRT,RES,SHR,DATA的含义 docker导出镜像并压缩 main.c ubuntu 20开启rc.local ubuntu 20.10上使用KVM安装K8S QEMU KVM宿主机与客户机间共享目录 Ubuntu20.10减肥 ubuntu的kennel命令行在哪个文件?虚拟机没有开SSH和TELNET,怎么连? 车辆功能部分缩写
LINUX间SSH免密登录
ZY.Zhou · 2021-01-25 · via 博客园 - ZY.Zhou

假如有三台LINUX电脑

$ cat /etc/hosts
...
 
192.168.122.100 dev01
192.168.122.101 dev02
192.168.122.102 dev03
 
...

1、建立新用户,如果使用ROOT帐户,跳过此步

$ useradd -d /home/dev -m dev
$ passwd dev
 
$ echo "dev ALL = (root) NOPASSWD:ALL" | tee /etc/sudoers.d/dev
$ chmod 0440 /etc/sudoers.d/dev

2、SSH免密登录

$ ssh-keygen
$ ssh-copy-id dev@dev01
$ ssh-copy-id dev@dev02
$ ssh-copy-id dev@dev03

3、设置CONFIG

$ vi ~/.ssh/config
Host dev01
   Hostname dev01
   User dev
Host dev02
   Hostname dev02
   User dev
Host dev03
   Hostname dev03
   User dev

4、免密登录测试

[root@dev01 ~]# ssh dev02
Last login: Wed Aug 22 16:55:06 2018 from dev01
[osdev@dev02 ~]$ exit
登出
Connection to dev02 closed.
[root@dev01 ~]# ssh dev03
Last login: Wed Aug 22 16:55:35 2018 from dev01
[osdev@dev03 ~]$ exit
登出
Connection to dev03 closed.