different ssh settings for different users

Ben Stringer ben at burbong.com
Wed May 31 07:34:39 UTC 2006


On Wed, 2006-05-31 at 11:54 +0530, Ankush Grover wrote:
> hey friends,
> 
> I am using openssh-3.9 on FC3.Is it possible to have different ssh
> settings for each user means if there is a user john and he can only
> connect through the port 3309 and if  there is a user mary she can
> only connect through the port 4067 ?
> 
> Rest of the users should be able to connect through the default port
> that is 5009.

Hi Ankush,

I believe you can do this by running a different sshd for each unique
port (using ListenAddress, Port) that you wish to allow ssh connections
to, then use the "AllowUsers" configuration property for each respective
sshd to limit the logins on each port to given users. You will need to
modify or duplicate the sshd service script to cater for this, and have
multiple sshd_config files, one for each unique port. 

> 
> Moreover is it possible to restrict some users to login only from few
> machines for example I want to restrict user tom that he can only
> login from one machine ?

Have a look at /etc/hosts.allow and /etc/hosts.deny for this one. Use of
these files will affect all connections, not just those via ssh.

Cheers, Ben

> 
> Please let me know if you need any further inputs.
> 
> Thanks & Regards
> 
> Ankush Grover
> 




More information about the fedora-list mailing list