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

时间:2016-07-15 04:12:35

标签: ssh mpi

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

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

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

Edit1:

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

1 个答案:

答案 0 :(得分:2)

据我所知,您无法在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

相关问题