banner
破影岚歌

破影岚歌的博客

bilibili
twitter
github

11. Remote Management Service Standard Configuration

Remote Management Service 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 firewall and SELinux on CentOS7.

  4. Test connectivity with 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 and is not secure.

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 will start with the CentOS boot and is a daemon process.

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

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 auto-start on boot

systemctl stop sshd.service   # Stop SSH service

SSH connection uses encrypted transmission and is recommended over telnet.

-p is optional, if not specified, the default is -p22 (22 is the default SSH port).

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.