Operating System - HP-UX
1754051 Members
3193 Online
108811 Solutions
New Discussion юеВ

Re: Limit SSH connections

 
SOLVED
Go to solution
Mrunal Nerpawar
Advisor

Limit SSH connections

Hi,

Can anyone tell me how the we can limit the no. of ssh connections to the HP-UX server.

I tried setting MaxStartups value in /etc/ssh/sshd_config file, but it is not working as i expect.

--Mrunal
7 REPLIES 7
Hakki Aydin Ucar
Honored Contributor

Re: Limit SSH connections

1-) Alternatively, random early drop can be enabled by specifying the three colon separated values ``start:rate:full'' (e.g.,"10:30:60") in this case I guess max. number of you need to limit must be 60.

2-) Did you restart sshd daemon ?
Mounaam
Trusted Contributor

Re: Limit SSH connections

Hi,

I don't think that MaxStartups answers your need.
It applies only for *unauthenticated* connections:
--8<--
MaxStartups
Specifies the maximum number of concurrent unauthenticated con-
nections to the sshd daemon. Additional connections will be
dropped until authentication succeeds or the LoginGraceTime ex-
pires 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 will refuse connection attempts with a proba-
bility of ``rate/100'' (30%) if there are currently ``start''
(10) unauthenticated connections. The probability increases lin-
early and all connection attempts are refused if the number of
unauthenticated connections reaches ``full'' (60).
-->8--

Regards,
Mounaam
Mrunal Nerpawar
Advisor

Re: Limit SSH connections

You are right Mounaam.
That option do not solve my purpose.

So is it that, there is no way to configure ssh connection limit on HP-UX servers?
Innate Ideas
New Member

Re: Limit SSH connections

If your version of ssh is 5.1 or newer the Maxsessions 1 option might work for you. It does not limit the total number of connections to the server but it does limit number of connections per client IP address.
Srikanth Kancharla
Occasional Advisor
Solution

Re: Limit SSH connections

Hi There,

You can try some thing like this
/etc/default/security
NUMBER_OF_LOGINS_ALLOWED=XX
Mrunal Nerpawar
Advisor

Re: Limit SSH connections

Thanks all for you inputs.

NUMBER_OF_LOGINS_ALLOWED works for any non-root user. This has solved my problem.

Thanks again to all of you!
Mrunal Nerpawar
Advisor

Re: Limit SSH connections

The inputs i have received on this thread has solved my issue.

Therefore closing this thread.