Your Place for Linux/Windows Tutorials
Security
How to Enable/Disable Root Login to SSH
Aug 21st
This article is going to show you how to disable and enable root login through SSH.
How to enable root login through SSH: 1.) Login as a root user (as always) 2.) Modify the following file with your favorite text editor:
/etc/ssh/sshd_config
3.) Find the line that says:
PermitRootLogin No
4.) Change no to yes More >
How to block IP using nullroute and IPTables
Aug 19th
How to block an IP address using nullroutes, and IPTables
Using the Nullrouting Method Login to your server as a root user, sudo will work also. Type the following:
route add 54.87.42.61 gw 127.0.0.1 lo
54.87.42.61 is the IP address you are going to block. Once you put that in, you don’t need More >
How to change SSH port
Aug 18th
How to change your SSH port
Login to your server via SSH as a user with root permissions (i.e. Sudo).
Changing the port:
After you have logged into your server, edit the following file with your favorite editor:
/etc/ssh/sshd_config
This file should look like:
Modify the line that says Port 22 and change it to whatever More >
How to add SSH user in CentOS
Aug 18th
How to add an SSH user in CentOS
Login to your server as a user with root privilages (i.e. Sudo)
1.) Adding the user
Run the following command:
adduser username
Replace username with the username you desire.
2.) Changing the password
You must change the password for the account, so they can login to SSH. Do that More >
Open a port in IPTables, CSF, and APF
Aug 18th
Login to your server through an SSH client, as root, or a user with root access. For example, you can use sudo.
How to open a port in IPTables: While you’re logged into your server as root, enter the following command:
iptables -A INPUT -p tcp --dport 2523 -j ACCEPT
Modify the 2523 More >