Score:0

limit users to use ssh nologin to one use at a time in ssh tunneling?

py flag

I have provided ssh nologin access for family members(with useradd -s /sbin/nologin newuser) to use it in ssh/http injector app in Android devices and NapsternetV app in iPhone devices to use as SSH Tunneling method and bypass GFW in Iran or China and access to free uncensored internet.

however, I have a big problem limiting each user to use his/her username and password to one device only at a time!(i.e. every user will be able to use this method only on one device/IP at a time and a second access must be refused from the server end). I have seen they share their authentication data and more than one user connect to the server under the mentioned user name! I defined MaxLogins in /etc/security/limits.conf but it does not work for SSH tunneling and it only works when someone intends to use the shell and log in the Ubuntu(Linux) server.

Is there any way I would be able to limit SSH users to only one login at a time based on their IP ?

Score:0
ve flag

Have you tried adding the maxsyslogins directive?

       maxlogins
           maximum number of logins for this user (this limit does
           not apply to user with uid=0)

       maxsyslogins
           maximum number of all logins on system; user is not
           allowed to log-in if total number of all user logins is
           greater than specified number (this limit does not apply
           to user with uid=0)

in man

Pejman  avatar
py flag
it did not work either
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.