Results 1 to 1 of 1
hey all, i am using openssh 5.2-p1, i want to restrict user "admin" to login to the server from a specific IP address, for this purpose i have tried the ...
- 06-09-2009 #1Just Joined!
- Join Date
- Apr 2009
- Posts
- 4
openssh restriction
hey all, i am using openssh 5.2-p1, i want to restrict user "admin" to login to the server from a specific IP address, for this purpose i have tried the following blocks in sshd_config file
Following is the part of the sshd_config file which i have modified
#The following commands will only allow specific IP to login to ssh.
#AllowUsers admin user1 user2
#AllowGroups
# override default of no subsystems.
Subsystem sftp internal-sftp
Match Group sftpgroup
ChrootDirectory /home
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp
# To restrict admin to login from specific IP
Match Address 172.16.100.221
AllowTCPForwarding no
X11Forwarding no
ForceCommand /etc/ssh
#Match Group admin
# AllowTCPForwarding no
# X11Forwarding no
# ForceCommand internal-sftp
i want to restrict admin user to login to the server only from 172.16.100.221 IP which can be done by using AllowUser line, but i dont want to use AllowUser line, kindly suggest any other solution.


Reply With Quote