Deny hosts

Simply removing th IP from /etc/hosts.deny does not work since DenyHosts keeps track of the attempts in the /usr/share/denyhosts/data directory.
Stop DenyHosts
# /etc/init.d/denyhosts stop
Remove Your IP From /etc/hosts.deny
# vi /etc/hosts.deny
Delete IP address. Save and close the file.
Remove the IP from /usr/share/denyhosts/data Directory
# cd /usr/share/denyhosts/data
You need to edit the following files using vi and remove the lines containing the IP address. Save the file.

hosts hosts-restricted hosts-root hosts-valid users-hosts
If the IP is static, add it to allowed-hosts file.
Any IP address that appears in this file will not be blocked by default (consider this as a whilelist):
# echo ‘x.x.x.x’ >> allowed-hosts
or put the IP directly here: ./var/lib/denyhosts/allowed-hosts
Start DenyHosts
# /etc/init.d/denyhosts start

httpd access control

Insert into section of an Apache configuration file or into .htaccess file or in a virtual host configuration section:

# AuthType Basic
# AuthUserFile /srv/auth/.htpasswd
# AuthName “Sign In Here To Gain Access To the Site”
# Require valid-user

Generating HTTP AUTH Passwords:
# yum install apache2-utils
# htpasswd -mcb /srv/auth/.htpasswd username password
c – create file, m – crypt with md5, b – insert the password in same line, -n – add new user

Access Control Lists with Groups
Insert into section of an Apache configuration file or into .htaccess file or in a virtual host configuration section:
# AuthType Basic
# AuthUserFile /srv/auth/.htpasswd
# AuthGroupFile /srv/auth/.htpgroup
# Require group Authorized

Install and Configure phpMyAdmin

yum -y install phpmyadmin
Install MySQL server on a CentOS/RHEL
You need download and install MySQL server on CentOS/RHEL using the following yum command:
# yum install mysql-server mysql

Turn on and start the mysql service, type:
# chkconfig mysqld on
# service mysqld start

Set root password and secure mysql installation by running the following command:
# mysql_secure_installation
Step #3: Configure phpMyAdmin

You need to edit /etc/httpd/conf.d/phpMyAdmin.conf file, enter:
# vi /etc/httpd/conf.d/phpMyAdmin.conf

It allows only localhost by default.
For HTTPD SSL enable (mod_ssl) and allow LAN / WAN users or DBA user to manage the database over www.

Require ip
Replace with your workstation IP address:
Require ip x.x.x.x
Again find the following line:
Allow from
Replace as follows:
Allow from x.x.x.x
Save and close the file. Restart Apache / httpd server:
# service httpd restart

type the following url in browser:
# vi /etc/phpMyAdmin/


HTTPD SSL as described here (mod_ssl):

setup ftp server on linux

yum -y install vsftpd
vi /etc/vsftpd/vsftpd.conf

Disallow anonymous:
Allow local uses to login by changing the local_enable setting to YES:
If you want local user to be able to write to a directory, then change the write_enable setting to YES:
Local users will be ‘chroot jailed’ and they will be denied access to any other part of the server; change the chroot_local_user setting to YES:

Restart the vsftpd service:
systemctl restart vsftpd
systemctl enable vsftpd
setup firewall in order to allow traffic on port 21:
vi /etc/shorewall/rules
vi /etc/sysconfig/iptables
and restart them–2

Drush commands

To install a chosen plugin you should download and enable it. Check the example listed below:
# drush dl addtoany
Project addtoany (7.x-4.0) downloaded to sites/all/modules/addtoany. [success]
# drush en addtoany

# drush cache-clear all
# drush help archive-backup

Nginx documentation

How to Install and Configure a NGINX Server (LEMP Stack)

How To Setup a NGINX Virtual Host Using a Custom Domain

copy file from Windows to Linux using scp

Download pscp.exe
Open cmd and go to directory where pscp.exe is downloaded.
run the command:
pscp.exe root@servername:/pathTo/YourFile/ F:\location\of\your\file

for uploading file from Windows to Linux, reverse the order:
pscp.exe F:\location\of\your\file root@servername:/pathTo/YourFile/

C:\Windows\System32>C:\apps\pscp.exe -P portNumber C:\Users\shop\Desktop\

Thanks to:

copy files from Windows to Linux

This can be done using pscp.exe. The steps:

Download pscp.exe from
Save to disk.
Open Windows CLI: Start -> Run -> type ‘command’ without quotes into Open field and click OK.
Drag ‘pscp.exe’ to the Windows CLI to give the CLI the full path of the command:

Upload specific file:
pscp file user@host:file

Download specific file:
pscp user@host:file file

Download all files in folder:
pscp -unsafe user@host:folder/*.* folder/

Usage: pscp [options] [user@]host:source target
pscp [options] source [source…] [user@]host:target
pscp [options] -ls [user@]host:filespec
-V print version information and exit
-pgpfp print PGP key fingerprints and exit
-p preserve file attributes
-q quiet, don’t show statistics
-r copy directories recursively
-v show verbose messages
-load sessname Load settings from saved session
-P port connect to specified port
-l user connect with specified username
-pw passw login with specified password
-1 -2 force use of particular SSH protocol version
-4 -6 force use of IPv4 or IPv6
-C enable compression
-i key private key file for authentication
-batch disable all interactive prompts
-unsafe allow server-side wildcards (DANGEROUS)
-sftp force use of SFTP protocol
-scp force use of SCP protocol