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