I wrote the below loop that creates ssh connections to remotehost1
$ cat sshloop.sh
#!/bin/sh
i=0
while [ $i -ne 500 ]
do
i=$(($i+1))
echo "SSH COUNT IS: $i"
ssh oracle@remotehost1 'uptime'
done
This scripts runs and makes all 500 ssh connections to remotehost1.
However, when i change the script to make connections to remotehost2 ssh oracle@remotehost2 'uptime' it hangs / stops after 20 connections only.
Where can i check this limit of 20 ssh connections only; and how can i increase it?
remotehost2 is
$ uname -a
SunOS remotehost2 5.11 11.4.34.94.4 sun4v sparc sun4v
The issue seems to be with the nofile value on remotehost2 which is far less than what we have on remotehost1 where it works fine. The issue could be something else as well. I m not sure as of now.
Can you tell me the command to increase the nofile value on solaris?
Kindly suggest.