Connecting to a Remote System Using SSH
The ssh
command is used to securely connect to a remote system using the SSH (Secure Shell) protocol. To connect to a remote system, you will need to know the IP address or hostname of the system, as well as a valid username and password for an account on the system.
Here is an example of how to use the ssh
command to connect to a remote system:
## Please set a password for labex user first.
sudo passwd labex
## The SSH default port is 22, you do not need to specify it.
ssh labex@127.0.0.1
In this example, user
is the username and 127.0.0.1
is the IP address of the remote system(this example use labex user and local address).
Once you have connected to the remote system, you will be prompted to enter yes
to confirm the connection and enter the labex user password. After you enter your password, you will be logged in to the remote system and will be able to run commands and manage the system just as if you were physically logged in to the system.