0

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

4
  • Please refer askubuntu.com/help/on-topic, Ubuntu and official flavors of Ubuntu (ubuntu.com/download/flavours) are on-topic on this site. The on-topic link provides alternate SE sites for non-Ubuntu OSes. Ubuntu Touch is supported by UBPorts and now called Lomiri, its not on-topic here
    – guiverc
    Commented May 20, 2023 at 10:04
  • 1
    @guiverc oh i see, honestly i just added the tag cuz it was recommended , else it's just an ubuntu/sshd related issue Commented May 20, 2023 at 10:09
  • 1
    Don't forget Ubuntu 18.04 LTS was released in 2018-April (why it's 18.04 with the year.month format used) which had 5 years of standard supported life.. Run 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.
    – guiverc
    Commented May 20, 2023 at 10:11
  • Ubuntu 18.04 LTS has reached the end of it's standard support life thus is now off-topic here unless your question is specific to helping you move to a supported release of Ubuntu. Ubuntu 18.04 ESM support is available, but not on-topic here, see askubuntu.com/help/on-topic See also ubuntu.com//blog/18-04-end-of-standard-support
    – guiverc
    Commented May 31, 2023 at 23:27

0

You must log in to answer this question.

Browse other questions tagged .