SSH client connects to remote server

Table of contents

1. What is a client connecting to a remote server

2. What is a server connection to a remote server

3. View network information

1. Graphical program to view network information

2. Command to view network information

4. SSH client (Linux)

5. SSH client (windows)

6. SSH remote server


1. What is a client connecting to a remote server

The party that initiates the connection, the computer or device (called the client), establishes a connection with another computer or device (called the remote server).

The client connects to the remote server through the network, and the remote server is the party that provides the required service or resource.

Clients usually use specific protocols (such as SSH, HTTP, FTP, etc.) to communicate with remote servers.

Example: You use an SSH client to connect to a remote server from your local computer to execute remote commands.

2. What is a server connection to a remote server

Refers to the establishment of connections to other remote servers on the server device. The server device acts as a client (starts the SSH client) and communicates with the remote server through the SSH protocol.

3. View network information

1. Graphical program to view network information

Open the settings, find the network, enter the network interface, click the settings icon to view;

2. Command to view network information

Use the command, ("ip address show") to view, or abbreviate ("ip a");

4. SSH client (Linux)

1. Open the terminal: In Linux, you can search for "terminal" in the application menu;

2. Install an SSH client: Most Linux distributions come with an SSH client pre-installed. If it is not installed on your system, you can install it using the package manager for your distribution.

For Debian/Ubuntu distributions, use the apt-get command:

sudo apt-get install openssh-client

For CentOS/Red Hat distributions, use the yum command:

sudo yum install openssh-clients

3. Connect to the remote server: If your user name is "myuser" and the IP address of the remote server is "192.168.0.1", you can use the following command to connect to the server:

ssh [email protected]

4. Enter the password: After connecting to the remote server, the SSH client will ask you to enter the password. After entering the correct password, you will successfully log in to the remote server.

5. SSH client (windows)

Windows has a built-in OpenSSH client, and you can directly use the command line for SSH connections.

1. Connect to the remote server: If your user name is "myuser" and the IP address of the remote server is "192.168.0.1", you can use the following command to connect to the server:

ssh [email protected]

2. Enter the password: After connecting to the remote server, the SSH client will ask you to enter the password. After entering the correct password, you will successfully log in to the remote server.

6. SSH remote server

1. Install the OpenSSH server software: Execute the package manager command suitable for your Linux distribution in the terminal to install the OpenSSH server software package. Here are examples of installation commands for some common distributions:

For Debian/Ubuntu distributions:

sudo apt update
sudo apt install openssh-server

For CentOS/Red Hat distributions:

sudo yum update
sudo yum install openssh-server

2. Start the SSH service: After the installation is complete, use the appropriate command to start the SSH service. Here are command examples for some common distributions:

For Debian/Ubuntu distributions:

sudo systemctl start ssh

For CentOS/Red Hat distributions:

sudo systemctl start sshd

Guess you like

Origin blog.csdn.net/m0_67906358/article/details/131750366