The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > BSD
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 06-18-2009
slydog slydog is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 2
try this command:

sudo cat /var/log/authlog | grep Invalid

if you've had your server open for any length of time, a large number of attempted logins will scroll by. Here's how to protect against these attacks ever succeeding:

groupadd ssh
vi /etc/group (and add yourself to the ssh group)

vi /etc/ssh/sshd_config
AllowGroups: ssh
PasswordAuthentication no

now add your public key your ~/.ssh/authorized_keys file

restart the ssh server:

sudo su -
(hit return to accept the default terminal selection)
pkill sshd && /usr/sbin/sshd