Configure ssh for centos

Source: Internet
Author: User
Centos configuration ssh-Linux Enterprise Application-Linux server application information. The following is a detailed description. When you install a Sever version of CentOS in VMware, the content in the terminal cannot be rolled, which is inconvenient. Good remote logon in win (an Xshell in win ). Ssh is installed by default. Only hosts access problems.

1. Add sshd: ALL at the end of the hosts. deny file

Deny all access requests

[Root @ localhost ~] # Vi/etc/hosts. deny

The modification looks as follows:

#
# Hosts. deny This file describes the names of the hosts which are
# ** Not * allowed to use the local INET services, as decided
# By the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# The new secure portmap uses hosts. deny and hosts. allow. In particle
# You shoshould know that NFS uses portmap!
Sshd: ALL

2. Add sshd: 192.168.0 at the end of the hosts. allow file.

It indicates that hosts from 192.168.0.1 to 254 are allowed on the Intranet.

[Root @ localhost ~] # Vi/etc/hosts. allow
#
# Hosts. allow This file describes the names of the hosts which are
# Allowed to use the local INET services, as decided
# By the '/usr/sbin/tcpd' server.
#
Sshd: 192.168.0.

3. Restart ssh
[Root @ localhost ~] #/Etc/rc. d/init. d/sshd restart
Stop sshd: [OK]
Start sshd [OK]

Now, you can log on with putty and Xshell (Xmanager.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.