How can I allow only one user to my Linux system?

Asked By 10 points N/A Posted on -
qa-featured

I want to assign  security to my system that allow only one user  by ssh login who has specific IP address and others should be denied,

How can I do that?

SHARE
Answered By 0 points N/A #132576

How can I allow only one user to my Linux system?

qa-featured

Hi Zion, 

You have a different solution in Linux OS, I am showing you one of them is called a TCP wrapper .

We need to configure two files –

1, /etc/hosts.allow
2, /etc/hosts.deny

# vi /etc/hosts.allow
sshd @192.168.1.254

# vi /etc/hosts.deny
ALL : ALL

sshd is a executive process here and only one can access to your computer by ssh who has 192.168.1.254 IP.

And all of them will be denied cause I set a rule in /etc/host.deny file,  ALL:ALL means all services from anywhere.

Britnu Salu

Related Questions