Ssh

From vpsget wiki
Jump to: navigation, search

Secure shell(ssh)is a network protocol for secure data communication with your server

How to use ssh

To connect to your server use ssh client like putty.

1. Download putty and run it.

2. In a window appeared enter your server IP or domain name, ssh port (22 by defailt), login (usually: root) and password.

3. Press "Connect".

If connection is successful you should see command prompt. Now you can enter commands to operate your server.

[root@test ~]# 


Securing ssh

Open the config file: /etc/ssh/sshd_config and change the default ssh port.

Find the following string:

#Port 22

Edit the port (choose any port from range 1025-65535), for example 20120

Port 20120

Make sure you have the port opened in firewall.

Restart ssh (CentOS):

service sshd restart

Disable root login.

Before disabling root login, create your own user, otherwise you will simply lose access to the server.

Find the line:

#PermitRootLogin yes

Edit the directive:

PermitRootLogin no

Restart ssh.