运行 非标准 ssh 端口上的 MPI 作业

Running MPI job on non-standard ssh port

我正在使用 MPICH 3.2 设置 运行 一些并行作业,我尝试使用示例测试配置(3 个节点,命名为 Ruby、Sapphire 和 Onyx(主节点))安装时提供的程序 cpi。当我尝试 运行 作业时出现以下错误:

ssh: connect to host Ruby_Slave port 22: No route to host
Host key verification failed.

Ruby 是在非标准 ssh 端口上 运行ning ssh,我认为这可能是问题所在。有什么方法可以在 MPI 中指定用于 ssh 的端口吗?

编辑 1:

Host Sapphire
    HostName 10.42.43.11
    Port 22
    PasswordAuthentication no
    EnableSSHKeysign yes
    RSAAuthentication yes
    PubkeyAuthentication yes

据我所知,您无法在 MPI 中指定用于 SSH 的端口。

然而,您可以在 .ssh/config 中逐台机器地告诉 SSH 使用哪个端口。用户配置文件(通常)位于 ~/.ssh/config,系统范围的配置文件位于 /etc/ssh/ssh_config.

这是一个示例配置:

Host 192.168.0.101
Port 5101
Host 192.168.0.102
Port 5102

也看看man ssh_config