大网数据广告活动
服务器运维问答

passwordless ssh for all machines on a network

· 52CE 我爱测

I know the basic way to allow key based authentication between two servers is by using these three steps: ssh-keygen ssh-copy-id -i remote_host ssh remote_host Using this approach I need to enter the password manually when I ssh …

问题原文

原帖链接 · bamcclur · CC BY-SA 3.0

I know the basic way to allow key based authentication between two servers is by using these three steps:

ssh-keygen
ssh-copy-id -i remote_host
ssh remote_host

Using this approach I need to enter the password manually when I ssh into remote host, and then do the reverse to allow the ssh to go both ways.

The issue I am running into is I need 100 servers on the same network in Azure to be able to ssh into each other bi-directionally without passwords, and to be able to do this hopefully again.

Is there a way for me to do this for all machines on the same network easily, without having to set this up for each one?

已采纳解答

原帖链接 · johnshen64 · CC BY-SA 3.0

to manage hundreds of servers you likely would be better off using some sort of configuration management tool such as puppet and chef, or ansible etc.

you still would have to set it up once but you can do much more than just ssh later so it would likely be worthwhile, for instance when you want to update the ssh key, a single change in the puppet master (or equivalent in other CMs) would suffice. for security it is recommended that you change your key once in a while.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-05-19)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。