1
我试图执行从一台机器下面的代码多次/ IPSSH并行命令执行冻结
#!/bin/bash
for i in `seq 1 10`;
do
ssh 11.156.112.111 pwd
done
# I know that the script is useless, it's just for demonstration.
我不能同时在两个以上的终端执行脚本,当我尝试在第三个终端运行该脚本,它冻结,我无法登录,但我可以从另一台机器/ IP登录。
我CONFIGS
# .ssh/config
Host *
ServerAliveInterval 10
ServerAliveCountMax 10
# sshd_config
UsePAM no
MaxSessions 100
MaxStartups 100
下面是详细模式输出,它冻结在最后一行:
OpenSSH_7.2p2, OpenSSL 1.0.2f 28 Jan 2016
debug1: Reading configuration data /home/neelix/.ssh/config
debug1: /home/neelix/.ssh/config line 1: Applying options for *
debug1: /home/neelix/.ssh/config line 11: Applying options for 11.156.112.111
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolving "11.156.112.111" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 11.156.112.111 [11.156.112.111] port 22.
debug1: Connection established.
debug1: identity file /home/neelix/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/neelix/.ssh/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2
试着运行'ssh -v 11.156.112.111 pwd'来抓住ssh卡住的地方 – Samuel
我已经更新了这个问题。 – neelix
你在你的问题中提到的脚本是否是卡住的确切脚本? – Samuel