[root@linuxcool ~]# ssh 192.168.10.10
The authenticity of host '192.168.10.10 (192.168.10.10)' can't be established.
ECDSA key fingerprint is SHA256:ZEjdfRjQV8pVVfu0TSYvDP5UvOHuuogMQSDUgLPG3Kc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.10.10' (ECDSA) to the list of known hosts.
root@192.168.10.10's password: 此处输入远程服务器管理员密码
Activate the web console with: systemctl enable --now cockpit.socket
Last login: Tue Dec 14 08:49:08 2022
[root@linuxprobe ~]#
使用指定的用户身份登录远程服务器主机系统:
[root@linuxcool ~]# ssh -l linuxprobe 192.168.10.10
linuxprobe@192.168.10.10's password: 此处输入指定用户的密码
Activate the web console with: systemctl enable --now cockpit.socket
[linuxprobe@linuxprobe ~]$
登录远程服务器主机系统后执行一条命令:
[root@linuxcool ~]# ssh 192.168.10.10 "free -m"
root@192.168.10.10's password: 此处输入远程服务器管理员密码
total used free shared buff/cache available
Mem: 1966 1359 76 21 530 407
Swap: 2047 9 2038