Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Without knowing what you mean by different settings it is not possible to say what you want to do is possible.
Hello,
Thank you so much for your reply.
I have two users on the system. Jason and James. I want Jason to use port 22 and James to use port 23 to use SSH and settings such as ListenAddress, MaxAuthTries, MaxSessions, etc. are different for each user.
that means you need to have two sshd processes, one of them is listening on port 22, with its own setup and another one on port 23. https://serverfault.com/questions/28...tiple-port-ssh
But anyway you can find a lot of info about it on the net, we can only repeat those information.
that means you need to have two sshd processes, one of them is listening on port 22, with its own setup and another one on port 23. https://serverfault.com/questions/28...tiple-port-ssh
But anyway you can find a lot of info about it on the net, we can only repeat those information.
Hello,
Thank you so much for your reply.
Looks like Match has a lot of options.
Is the following configuration correct?
Code:
match user jason
PermitRootLogin no
MaxSessions 1
MaxAuthTries 2
PermitEmptyPasswords
LocalPort 22
No that is not the explanation. The question was why do you want it? What problem do you want to solve by using two ports?
Hello,
Thanks again.
I want to do this for two reasons:
1- I want to have Fail2Ban service for one port, but not for another.
2- When you install a program like GitLab, this program uses port 22 by default to clone through SSH. If you change the SSH port to another port, then you must define this new port through the gitlab_shell_ssh_port option in the GitLab settings. This causes problems for some users because they use port 22 by default to clone repositories. If having different ports, then one port can be used for system management and another port can be used for all users in the GitLab group.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.