300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > [Linux] ssh命令:安全的远程连接服务器

[Linux] ssh命令:安全的远程连接服务器

时间:2020-01-12 13:40:23

相关推荐

[Linux] ssh命令:安全的远程连接服务器

ssh命令的功能是用于安全的远程连接服务器主机系统,作为openssh套件中的客户端连接工具,ssh命令可以让我们轻松的基于ssh加密协议进行远程主机访问,从而实现对远程服务器的管理工作。

语法格式: ssh [参数] 远程主机

常用参数:

实例参考

基于ssh协议,远程访问服务器主机系统:

[root@liuzhongwei ~]# ssh 192.168.10.10The authenticity of host 192.168.10.10 (192.168.10.10) can 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.10s password: 此处输入远程服务器管理员密码Activate the web console with: systemctl enable --now cockpit.socketLast login: Tue Dec 14 08:49:08 [root@linuxprobe ~]#

使用指定的用户身份登录远程服务器主机系统:

[root@liuzhongwei ~]# ssh -l linuxprobe 192.168.10.10linuxprobe@192.168.10.10s password: 此处输入指定用户的密码Activate the web console with: systemctl enable --now cockpit.socket[linuxprobe@linuxprobe ~]$

登录远程服务器主机系统后执行一条命令:

[root@liuzhongwei ~]# ssh 192.168.10.10 "free -m"root@192.168.10.10s password: 此处输入远程服务器管理员密码 total used freeshared buff/cache availableMem: 1966 13597621 530 407Swap:2047 9 2038

强制使用v1版本的ssh加密协议连接远程服务器主机:

[root@liuzhongwei ~]# ssh -1 192.168.10.10

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。