Log in to Linux system
The ssh command is used to remotely log in to the linux host.
Typical usage: ssh [-l login_name] [-p port] [user@]hostname
For more detailed information, see ssh -h outputs.
Log in with the root account by default
ssh 192.168.0.11
Log in with a specific user account
ssh -l root 192.168.0.11
Log in with a custom ssh port
ssh -p 12333 192.168.0.11
ssh -l root -p 12333 192.168.0.11
ssh -p 12333 [email protected]
Tips
The first time you log in to the remote host, the following message shows up.
$ ssh user@host
The authenticity of host 'host (12.18.429.21)' can't be established.
RSA key fingerprint is 98:2e:d7:e0:de:9f:ac:67:28:c2:42:2d:37:16:58:4d.
Are you sure you want to continue connecting (yes/no)?
Suppose that after risk assessment, the user decides to accept the public key of this remote host.
Are you sure you want to continue connecting (yes/no)? yes
The system will have a prompt, indicating that the host is now known and trusted.
Warning: Permanently added 'host,12.18.429.21' (RSA) to the list of known hosts.
Then, you will be prompt to enter the password.
Password: (enter password)
If the password is correct, you can log in.