I'm using a couple of vm's as an ssh tunnel-vpn for both android and iOS, using ssh clients on both OS's. so now i want to limit the number of sessions per each user in order for each user is limited to 1 session at a time. for example: let's say i created 20 users and enabled password authentication for these users ( user1 ,...user20 ).
I have already tried setting these limits to 1 in
sshd_config: maxsessions=1, maxstartups =1
and
"* hard maxlogins 1" & "* soft maxlogins 1" in limits.conf
my PAM settings are pretty straight forward too.
now the interesting part is that when I try to ssh into the vm with a user,let's say user10(ssh user10@server ), the limit works and I can not ssh to it on any other devices, but for ssh clients on the phone (that is used for only tunneling the phone and using the ssh ass a vpn) it doesn't . I can tunnel more than 100 phones when using this vm.
basically I want each user to be able to tunnel only one device at a time and not any more than that, sort of a device limit for the connection
I reckoned the problem is that maybe the issue stems from something I don't know or am not considering.
I wondered maybe the process for tunneling a phone using ssh clients is far different from ssh-ing to a VM
apps I've used on phone: napsternet for iOS and matsuri for Android
any help is appreciated
ubuntu-support-status
to confirm your status, and you'll note EOSS has occurred. Some architectures will continue to get upgrades during May 2023 due to a Canonical decision to extend life (by one month), but your system is effectively EOSS now & you should plan your upgraded asap. EOSS for all 18.04 is 31-May-2023.