LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-08-2014, 02:10 AM   #1
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1-15 RH 6.2/7, RHEL 6.5 SuSE 8.2/11.1, Debian 10.5
Posts: 516

Rep: Reputation: 32
MaxSessions in sshd_config not limiting sessions


I'm having trouble limiting the njhumber of concurrent ssh connections, now I don't know if this is something new or not, I seem to recall being here before, but regardless, I have the MaxSessions set to 3 in my sshd_config file and note from the man page:
Code:
MaxSessions
             Specifies the maximum number of open sessions permitted per net-
             work connection.  The default is 10.
But I seem to be able to connect as many times as I like, see my log entries below.

Code:
Jul  8 08:03:04 orion sshd[21107]: Accepted password for myuser from 81.137.xxx.xx port 57428 ssh2
Jul  8 08:03:16 orion sshd[21180]: Accepted password for myuser from 81.137.xxx.xx port 57429 ssh2
Jul  8 08:03:26 orion sshd[21253]: Accepted password for myuser from 81.137.xxx.xx port 57430 ssh2
Jul  8 08:03:36 orion sshd[21326]: Accepted password for myuser from 81.137.xxx.xx port 57431 ssh2
Jul  8 08:03:45 orion sshd[21399]: Accepted password for myuser from 81.137.xxx.xx port 57439 ssh2
Jul  8 08:03:54 orion sshd[21472]: Accepted password for myuser from 81.137.xxx.xx port 57440 ssh2

Note: I do have the MaxStartups set which is working as expected

Any suggestions?

Running Slack 14 64 with
OpenSSH_6.6.1p1, OpenSSL 1.0.1h 5 Jun 2014


Thanks in advance...

Last edited by plisken; 07-08-2014 at 02:16 AM.
 
Old 07-08-2014, 03:48 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

short answer: this is not what the MaxSessions directive is supposed to limit. It is related to lower level networking IIRC. Sorry I don't have the reference at hand right now.

Evo2.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sshd_config/ maas187 Linux - Security 7 04-21-2009 11:09 PM
sshd_config settings powah Linux - Security 3 06-03-2008 01:59 PM
limiting ssh sessions for a given user breenbaron Linux - Security 2 03-16-2004 10:20 AM
sshd_config eyt Linux - Newbie 2 02-19-2004 12:05 PM
limiting concurrent TCP sessions from a single IP n3tw0rk Linux - Security 2 12-31-2003 06:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration