Ubuntu remote SSH connection and remote desktop connection

Table of contents

1. View network information

1. Graphical program to view network information

2. Command to view network information

2. Remote Desktop Connection

3. Remote SSH connection

1. Install the client

2. Install the server

3. The difference between SSH client and server


1. 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");

To use ifconfig, you need to prompt to install the tool;

2. Remote Desktop Connection

First, you need to make some settings in Ubuntu, click the control area in the upper right corner of the interface, and select the setting option;

Pop up the interface to enter the network, click the setting icon to check the current Ubuntu IP address;

Switch to the sharing interface, where there is a remote desktop, which is closed at the beginning and cannot be operated;

Click the switch in the upper right corner to enable this function, then start the remote desktop and start remote control;

Then the following certification can be modified, and then it will be fine;

Go to other computers, search and start Remote Desktop Connection;

3. Remote SSH connection

1. Install the client

To install an SSH client and connect to a remote server, follow these steps:

1. Open a terminal and enter the following command to install the SSH client:

sudo apt-get update
sudo apt-get install openssh-client

2. Enter your Ubuntu computer administrator password to confirm the installation.

3. After the installation is complete, start the SSH service and enter the following command:

sudo service ssh start

4. Confirm that the SSH server is running, enter the following command:

sudo service ssh status

5. root is the user name of the remote computer you want to connect to, and 192.168.1.1 is the IP address of the remote computer you want to connect to.

The command to log in to the server with ssh is:

>ssh [email protected]

>Enter the root user's password

If the remote computer you want to connect to is not using the port by default, you need to add the -p flag, the default port number of the ssh service is 22 For example:

The command to log in to the server with ssh is:

>ssh –p 22 [email protected]

>Enter the root user's password

2. Install the server

To install an SSH server and initiate an SSH connection, follow these steps:

1. Open the terminal and enter the following command to install the SSH server:

sudo apt-get update
sudo apt-get install openssh-server

2. Enter the administrator password of your Ubuntu computer to confirm the installation.

3. After the installation is complete, start the SSH service and enter the following command:

sudo service ssh start

4. Confirm that the SSH server is running, enter the following command:

sudo service ssh status

5. As above

root is the username of the remote computer you want to connect to and 192.168.1.1 is the IP address of the remote computer you want to connect to.

The command to log in to the server with ssh is:

>ssh [email protected]

>Enter the root user's password

If the remote computer you want to connect to is not using the port by default, you need to add the -p flag, the default port number of the ssh service is 22 For example:

The command to log in to the server with ssh is:

>ssh –p 22 [email protected]

>Enter the root user's password

3. The difference between SSH client and server

An SSH client is a client software that can connect to an SSH server and perform remote operations. It allows users to execute commands on remote hosts, transfer files to remote hosts, or download files from remote hosts.

An SSH server is a server software that runs on a remote host and accepts connections from SSH clients. It provides remote access, management and sharing of resources.

In terms of security, both the SSH client and server use encryption technology to protect communication security. An encrypted channel between client and server prevents unauthorized parties from accessing sensitive data or information.

Therefore, both the SSH client and the server are independent software and play different roles in different situations.

Guess you like

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