How to avoid access computer through ssh

Linux OS Topics
Post Reply
ARDS
Corporal
Corporal
Posts: 3
Joined: Wed Dec 01, 2010 3:03 pm

How to avoid access computer through ssh

Post by ARDS » Tue Jan 25, 2011 1:04 pm

hi,
I want to know how to avoid access a computer through ssh ? Is there is a possible way ? :)

Thanks.
User avatar
Saman
Lieutenant Colonel
Lieutenant Colonel
Posts: 828
Joined: Fri Jul 31, 2009 10:32 pm
Location: Mount Lavinia

Re: How to avoid access computer through ssh

Post by Saman » Tue Jan 25, 2011 4:19 pm

You can disable Shell access but it is not a good idea at all. What we usually do is RESTRICT SSH access to some accounts. You can use the following command to avoid access via SSH for a given user account.

Code: Select all

# chsh -s /sbin/nologin {username}
The common problem that users expereince is hacking the root account using brute force attacks over SSH. The solution is to disable root access to SSH and make a user and set it to access SSH. See How to secure your system from hacking over SSH.
ARDS
Corporal
Corporal
Posts: 3
Joined: Wed Dec 01, 2010 3:03 pm

Re: How to avoid access computer through ssh

Post by ARDS » Tue Jan 25, 2011 9:28 pm

Saman wrote:You can disable Shell access but it is not a good idea at all. What we usually do is RESTRICT SSH access to some accounts. You can use the following command to avoid access via SSH for a given user account.

Code: Select all

# chsh -s /sbin/nologin {username}
The common problem that users expereince is hacking the root account using brute force attacks over SSH. The solution is to disable root access to SSH and make a user and set it to access SSH. See How to secure your system from hacking over SSH.
Thanx for ur help. :)
Post Reply

Return to “Linux”