文档首页/ 云监控服务 CES/ 用户指南(安卡拉区域)/ 常见问题/ 主机监控/ 批量安装Agent报错“SSH dial error”该如何处理?
更新时间:2025-11-18 GMT+08:00

批量安装Agent报错“SSH dial error”该如何处理?

问题现象

使用CES控制台提供的Agent批量安装命令安装CES Agent时出现报错”SSH dial error”,导致Agent安装失败,如图1所示。
图1 批量安装Agent失败

问题分析

目标主机sshd配置中不允许root直接登录、不允许密码方式登录。

解决方式

  • 查看sshd配置文件。
    1. 使用root用户登录安装失败的主机。
    2. 执行命令查看sshd配置文件中PermitRootLogin和PasswordAuthentication配置是否为yes。
      如果配置不是yes,请参考修改sshd配置文件修改配置。
      cat /etc/ssh/sshd_config
  • 修改sshd配置文件:
    1. 执行命令编辑sshd_config文件。
      vi /etc/ssh/sshd_config
    2. 修改配置项。
      PermitRootLogin yes
      PasswordAuthentication yes
    3. 执行命令,重启sshd进程:
      systemctl restart sshd