why awk? awk is small, fast, and simple, unlike, say, perl. awk also has a clean comprehensible C-like input language, unlike, say, perl. And while it can’t do everything you can do in perl, it can do most things that are actually text processing, and it’s much easier to work with. what do you do? [ Read More ]
It’s always a good practice & from the security point of view to get notified instantly through an email when someone logs into your server through SSH with root privileges. Open the file .bashrc for the root user. Vi /root/.bashrc enter the following code into echo ‘SSH Root Access (Your Server Name) on:’ `date` `who` [ Read More ]
You can easily changed your black ssh screen to colorful screen by using following steps. 1) Login to the server via SSH as root 2) Edit the .bash_profile file found in the /root directory & paste the following line: vi .bash_profile export PS1=”\[$(tput bold)$(tput setb 4)$(tput setaf 7)\]\u@\h:\w $ \[$(tput sgr0)\]” Save & quit the [ Read More ]
How to redirect domain from https://domain.com to http://domain.com ? Ans: If you tried all the possibilities with the .htaccess file and your domain is still not redirected from https to http then finally you can add following code in virtual host entry means in httpd.conf file. Search the 443 entry for a domain and add [ Read More ]
If you want to copy all of the files and folders from one host to another by using the ftp account. Then use the following command to download the files/folders on remote server by using wget. Use this command on destination server. wget -r ftp://username:password@ip.of.old.host Some on the hosting provider disabled the main ftp account [ Read More ]
If you want to install software/packages after installation of linux (CentOS, Fedora etc.). You can create the yum repository to install all the software/packages which is present into the instillation CD. When you have try to install software/packages then some time it shows dependencies problems. To fix this problem I suggest your create the local machine [ Read More ]
How to Add ssh user on linux server ? Ans: You can use the putyykey generator and generate the ssh key for the user and copy into the local computer.You can download the puttykey generator from the URL http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe The following are the steps for creating ssh user with the authentication :- #adduser test #passwd [ Read More ]
How to remove blocked ip address from the Brute Force Protection by using SSH ? When WHM locks out an user account, especially “root”, the best way is to wait for 10 minutes to see if the account will be unlocked. If the locks persists, webmaster and administrator who still can remote login via SSH [ Read More ]
Here is how to Zip and Unzip files in UNIX unzip myFile.zip – This command will uncompress compressed files with the .zip extension. tar xvf myFile.tar – This command will uncompress compressed files with the .tar extension. gunzip myFile.gz – This command will uncompress compressed files with the .gz extension.
The SYN (TCP connection request) attack is a common denial of service (DoS) technique. A SYN flood is a form of denial-of-service attack in which an attacker sends a succession of SYN requests to a target’s system When a client attempts to start a TCP connection to a server, the client and server exchange a [ Read More ]
Command for to Delete php.ini file from all directories find -name php.ini -exec rm -f {} \;
How to find How many accounts are hosted on server #ll /var/cpanel/users | wc -l 1234
How to check spamming on server.. exim -bpc If this is change very fast then it seems spamming is on server also you can check using tail -f /var/log/exim_mainlog some times client can spam using scripting that time above using above you can’t find error log so you can use tail -f /var/log/message or ps [ Read More ]
How to check insecure permission for files and folders on the server ? #For Directories find -type d -perm 777 #For Files find -type f -perm 777
How to check server is suexec or not? make 777 permission for index.php file for a clients domain and then access it, if it gives an error as Internal server then sure it is suexec server this time copy servers php.ini file and make necessary changes for client. or root@rushi []# /usr/local/cpanel/bin/rebuild_phpconf – -current Available [ Read More ]