Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7502387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:51:07+00:00 2026-05-29T20:51:07+00:00

the following script testssh.ksh proves that ssh have some problems when we try to

  • 0

the following script “testssh.ksh” proves that ssh have some problems when we try to perform ssh from multiple machines on the same time

in fact the target of this script is to verify the file test_file under /var/tmp in the Solaris server (10.10.18.6) , as all see in some ssh steps we can’t verify
the existing of the test_file because ssh stuck or not activate from the expect

background – this script perform 15 times ssh to Solaris server with IP – 10.10.18.6 on the same time in order to verify the file_test under /var/tmp in the server

my question – how to improve the ssh process in order to avoid the following problems

Remark – sleep can help us in this situation – but I not want to add sleep before ssh process

  [root@linux /var/tmp]# more  testssh.ksh
  #!/bin/ksh



  expect=`cat << EOF
  set timeout -1
  spawn  ssh  10.10.18.6 
       expect {
                 ")?"   { send "yes\r"  ; exp_continue  }

                 word:  {send pass123\r}
              }
  expect >  {send "ls  /var/tmp/test_file\r"}
  expect >    {send exit\r}
  expect eof
  EOF`


  for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  do
     ( expect -c  "$expect"  | grep "test_file"  | grep -v ls ) &
  done

example – when we run the script testssh.ksh

     [root@linux /var/tmp]# /var/tmp/testssh.ksh
     /var/tmp/test_file
     /var/tmp/test_file
     /var/tmp/test_file
     /var/tmp/test_file
     /var/tmp/test_file
     expect: spawn id exp6 not open
     while executing
     "expect >  {send "ls  /var/tmp/test_file\r"}"
     expect: spawn id exp6 not open
     while executing
     "expect >  {send "ls  /var/tmp/test_file\r"}"
     expect: spawn id exp6 not open
     while executing
     "expect >  {send "ls  /var/tmp/test_file\r"}"
     expect: spawn id exp6 not open
     while executing
     "expect >  {send "ls  /var/tmp/test_file\r"}"
     /var/tmp/test_file
     /var/tmp/test_file
     /var/tmp/test_file
     /var/tmp/test_file
     /var/tmp/test_file
     /var/tmp/test_file
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T20:51:09+00:00Added an answer on May 29, 2026 at 8:51 pm

    Have you set the MaxSession and MaxStartups in your sshd.conf (or equivalent)? 40 simultaneous SSH connections should not, I believe, be too many for your server to handle.

    From man sshd_config page:

     MaxSessions
             Specifies the maximum number of open sessions permitted per net‐
             work connection.  The default is 10.
    
     MaxStartups
             Specifies the maximum number of concurrent unauthenticated con‐
             nections to the SSH daemon.  Additional connections will be
             dropped until authentication succeeds or the LoginGraceTime
             expires for a connection.  The default is 10.
    
             Alternatively, random early drop can be enabled by specifying the
             three colon separated values “start:rate:full” (e.g. "10:30:60").
             sshd(8) will refuse connection attempts with a probability of
             “rate/100” (30%) if there are currently “start” (10) unauthenti‐
             cated connections.  The probability increases linearly and all
             connection attempts are refused if the number of unauthenticated
             connections reaches “full” (60).
    

    If you haven’t changed these, your server won’t handle more than 10 simultaneous connections.

    Similar question (serverfault.com).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following script that is taken from a python game development book.
I have the following script that dumps a given array's contents function dump(obj) {
I have the following script that loads a page into a div and not
I have the following script that I want to insert into a table, but
I have the following script: $('#element_1').live('click', function() { function_1(this) }); function function_1(that) { that
I have the following script that is working great, but I want to wrap
The following script will delete files in a named directory that are older than
I have the following script. It replaces all instances of @lookFor with @replaceWith in
I have the following script, where the first and third document.writeline are static and
i have the following script import getopt, sys opts, args = getopt.getopt(sys.argv[1:], h:s) for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.