Centos: How to change SSH Port

ssh nano
In order to secure your server, ROOT access. You should consider to change your default SSH port (Port 22) to NON-Standard port. And you make sure that new SSH Port is allowed by your server fireWall.

Simple Steps:

1. Use ssh client such as Putty to log in to your server with old port (default 22).

2. Change SSH config file /etc/ssh/sshd_config

nano /etc/ssh/sshd_config

If nano editor is not installed on server, use this command to install it

yum install nano

Use vi command instead

vi /etc/ssh/sshd_config

Find this line:

#Port 22

Change to your own port and uncomment that line. Example:

Port 1111

Then open new PORT on your server. If you use CSF firewall, just log in to WHM and open CSF control panel then edit TCP_IN port.
Continue reading “Centos: How to change SSH Port”

How to backup/restore database via SSH/Telnet

In order to back up your database via SSH/Telnet, you are required two things:

1. You have ROOT access to your server:

(VPS and Dedicated server only, thats not allowed on Shared hosting). Ask your hosting provider or check again the email they sent to you when your order was complete.

You need to know:

– Server ips

– Port (default: 22)

– Username (default: root)

– Password

2. An SSH/Telnet Client, such as PuTTy.

Download Putty here. (link)

Open Putty client then choose SSH connection type and enter your server ip address. (Host name or ip address)

putty client
Continue reading “How to backup/restore database via SSH/Telnet”