ssh 添加主机etc
When managing many hosts, answering 100s of “yes” can make us crazy. In a trusted environment, let ssh automatically add the new hosts to the list of known hosts and free us from typing “yes”es. How to enable it?
当管理许多主机时,回答数百个“是”会使我们发疯。 在受信任的环境中,让ssh自动将新主机添加到已知主机列表中,并使我们不必键入“是”。 如何启用?
Method 1. Passing option to ssh
方法1.将选项传递给ssh
ssh -o StrictHostKeyChecking=no username@host
Method 2. Configuring ~/.ssh/config
方法2。配置~/.ssh/config
To automatically add hosts starting with 10.*
自动添加以10 *开始的主机
Host 10.*
StrictHostKeyChecking no
Answered by anonymous.
匿名回答。
翻译自: https://www.systutorials.com/howto-ssh-automatically-add-new-hosts-to-the-list-of-known-hosts/
ssh 添加主机etc