Category Archives: Linux

Enable SSH Root login in Linux

You need to edit /etc/ssh/sshd_config, and change PermitRootLogin to yes PermitRootLogin yes Also change StrictModes to no StrictModes no Then reload SSH: service ssh reload

Posted in Linux | Leave a comment

Enable root access in Ubuntu

To enable the Ubuntu root account, first we need to set up password for the root user. sudo passwd root Then unlock the root account sudo passwd -u root

Posted in Linux, Ubuntu | Leave a comment

Server Hardening Linux Applications

OS Harden sysctl -w net.ipv4.ip_default_ttl=128 (changed it right then) and add net.ipv4.ip_default_ttl = 128 to /etc/sysctl.conf (so it applys at reboot) ______________________________________________________ APACHE AND PHP ServerSignature Off ServerTokens Prod ServerTokens Prod[uctOnly] Server sends (e.g.): Server: Apache ServerTokens Major Server sends … Continue reading

Posted in Linux | Leave a comment

Yum and Apt-Get Command Examples

Ubuntu Update/Upgrade sudo apt-get clean sudo apt-get update sudo apt-get upgrade Redhat / CentOS / Fedora yum clean all yum update yum list updates yum update To install soft sudo apt-get install lxde List all installed packages, enter: # rpm … Continue reading

Posted in Fedora, Linux, Redhat, Ubuntu | Leave a comment

Linux Single User Mode Reset Root Password

To do this reboot the Server as soon as you get the boot screen press ‘e’ (stands for edit) from keyboard. After you press ‘e’ from keyboard you would see a lot of text which may be clipped as per … Continue reading

Posted in Fedora, Linux, Redhat | Leave a comment

Ubuntu Firewall Command Line Examples

How do I see the current status of my firewall? sudo ufw status verbose How do I open tcp port # 22? To allow incoming tcp packets on port 22, enter: sudo ufw allow 22/tcp Verify it: sudo ufw status … Continue reading

Posted in Linux, Ubuntu | Leave a comment

Linux Find and Copy Command Examples

find files less 46 bytes and delete /usr/bin/find /share/team/ -maxdepth 5 -type f -size -46 -print | xargs rm -f Recursively remove all empty directories find . -type d -empty -delete /usr/bin/find /share/teamleads/ -type d -empty -delete /usr/bin/find /home/ -type … Continue reading

Posted in Linux | Leave a comment

Setting Up NTP (Network Time Protocol) Server in RHEL/CentOS 7

Step 1: Install ntp server package #yum install ntp -y Step 2: Get official NTP servers located near to your location. I am using Asia servers for this setup server server server server Step 3: Open … Continue reading

Posted in CentOS, Linux, RHEL | Leave a comment