banner
破影岚歌

破影岚歌的博客

bilibili
twitter
github

11. Remote Management Service Standard Configuration

Remote Management Services for CentOS7#

Experimental Environment:#

  1. CentOS7: 192.168.0.1
  2. Windows7: 192.168.0.2

Experimental Steps#

  1. Set up the network environment (connect two hosts to vmnet1).

  2. Set IP addresses.

  3. To ensure smooth experimentation: Disable the firewall and SELinux on CentOS7.

  4. Test connectivity using ping (Windows client pinging CentOS7 server).

  5. Install telnet-server software on CentOS7.

  6. Start the telnet service: systemctl start telnet.socket.

  7. Remote connect from Windows7 client (using built-in telnet tool or third-party telnet tool).

  8. Log in to CentOS using an account (for security reasons: by default, root can only log in locally and not remotely).

    Solution: Use a regular user account to log in and then switch to root using the su command:

    Method to add a regular user:

    user add mike (create mike user)
    passwd mike 123 (set mike user password)
    

    Method for remote login from Windows:

    telnet 192.168.0.1
    After successful login:
    su root
    Enter root user password
    

Introduction to Third-Party Remote Login Tools#

SecureCRT

putty


Telnet transmits data in plain text, which is insecure.

Edit: Add to /etc/securetty:

pts/0 (allow one thread to connect simultaneously)
pts/1 (allow two threads to connect simultaneously)

Connecting to CentOS7 using ssh#

The SSH server starts with the launch of CentOS and is a daemon process.

We can check if the SSH service is running using the following command:

systemctl status sshd.service

We can also use the following commands to start, stop, and restart the ssh service:

systemctl start sshd.service         # Start ssh service

systemctl restart sshd.service      # Restart ssh service

systemctl enable sshd.service      # Enable ssh service at startup

systemctl stop sshd.service   # Stop ssh service

SSH connections use encrypted transmission and are more recommended than telnet for connecting.

-p is optional, if not specified, the default is -p22, 22 is the default port for ssh connections.

root is the username.

@ is the connector between the username and the hostname or IP address.

192.168.0.1 is the hostname or IP address of the connection.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.