""A bird doesn't sing because it has an answer, it sings because it has a song."
Maya Angelou
Having complete control over SSH access is the first step we could take to secure our box from intruders! There are many steps we could take to secure SSH access. To list a few:
To do the above all you need to do is modify the /etc/ssh/sshd_config to suit your needs. Here is how you can do it:
#Port 22 #Protocol 2, 1 #ListenAddress 0.0.0.0 #ListenAddress ::
#Port 22to the port number of your choice. Remember 49151 is the highest port number
#Protocol 2, 1to look like
Protocol 2
#ListenAddress 0.0.0.0to look like
ListenAddress 123.123.123.15 (use one of your own IP Addresses that has been assigned to your server)
#PermitRootLogin yesand uncomment it and make it look like
PermitRootLogin no
/etc/rc.d/init.d/sshd restart
echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert:
Root Access from `who | awk '{print $6}'`" you@email.com
This computer system is for authorized users only. All activity is logged and regularly checked by systems personnel. Individuals using this system without authority or in excess of their authority are subject to having all their services revoked. Any illegal services run by user or attempts to take down this server or its services will be reported to local law enforcement, and said user will be punished to the full extent of the law. Additionally, IRC (or Related Software), bnc, ptlink, PsyBNC, eggdrop, BitchX, or any related application may NOT be used or stored (Compressed or Otherwise) on this Server. Failure to comply will result in immediate account termination. SPAMMING OR MASS-MAILING OF ANY KIND WILL BE GROUNDS FOR IMMEDIATE ACCOUNT TERMINATION WITHOUT THE POSSIBILITY OF REACTIVATION OR REFUNDS OF SERVICES PAID. Anyone using this system consents to these terms.
