LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-20-2020, 07:16 AM   #1
gabrielpasv
LQ Newbie
 
Registered: Feb 2016
Posts: 20

Rep: Reputation: Disabled
How many users can login with the same ssh account ?


Hi Guys, not sure if this is the correct place to paste this question. But what I need is to know how many people logged in with the same linux user account ?
I am delivering a simple python TUI (text base UI) application to ~1k of users. The application will have its own authentication process. Users will run it via ssh. So, I need only one ssh user with basic permissions to make the ssh to the server and automatically run this python TUI application.

How many users can login with the same ssh account ? Thanks
 
Old 06-20-2020, 07:32 AM   #2
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 687
Blog Entries: 1

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Take a look at these options in /etc/sshd_config

Code:
MaxSessions 10
MaxStartups 10:30:100
MaxStartups may the the one to adjust, I cannot exactly say the max connections as I never experimented with these options.
 
Old 06-20-2020, 07:34 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,307
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
There's not really a setting for that in sshd_config, as far as I know, in regards to general connections. It depends on the RAM on the target machine and you can probably run up hundreds if not thousands of SSH connections before you have networking or RAM troubles.

If these connection are all going to come from the same account on a single machine then you might look at SSH multiplexing. For that you would have a default limit of 10 conncurrently multiplexed sessions unless you can the MaxSessions setting.

However, there is probably a much better way to solve the task at hand than to give out shell access to thousands of people and their machines. Please describe what you are trying to do in a little more detail.
 
Old 06-29-2020, 03:53 AM   #4
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
check out this thread: https://www.linuxquestions.org/quest...e-user-607269/

From thread above:
Quote:
You can set a maximum number of logins in /etc/security/limits.conf for an user or a group of users.

For example:
Code:

# echo "@loginrestriction - maxlogins 4" >> /etc/security/limits.conf
# echo "username - maxlogins 1" >> /etc/security/limits.conf
# useradd -G loginrestriction someuser
Or check out this link: https://unix.stackexchange.com/quest...ogins-per-user

Quote:
#limit all users with a GID >= 1000 to two logins each
1000: - maxlogins 2
#limit user johndoe to one login
johndoe - maxlogins 1

Last edited by JJJCR; 06-29-2020 at 04:38 AM. Reason: edit
 
1 members found this post helpful.
  


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
[SOLVED] How many LQ users do you have to give "Rep" to, before you can give the same LQ users more "Rep"? jsbjsb001 LQ Suggestions & Feedback 3 04-17-2017 04:38 PM
[SOLVED] SSH - How can I only allow a key pair login for my user account not root account? shanekelly Linux - Security 5 01-25-2013 09:45 AM
prevent users to run the same script at the same time, on the same machine pvpnguyen Programming 2 09-05-2007 08:52 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM
Multi Booting many, many, many, OS's mac_man25 Linux - General 10 10-26-2003 09:13 AM

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

All times are GMT -5. The time now is 02:37 AM.

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