远程连接服务器的类型(以登录的连接界面来分类)
文字接口
明文传输:
Telnet
、
RSH
等,目前非常少用
加密传输:
SSH
为主,已经取代明文传输
图形接口:
XDMCP
、
VNC
、
XRDP
等
SSH协议
SSH
(
Secure Shell
),安全外壳协议,是一种建立在应用层基础上的安全协议,通过对密码进行加密传输验证,可以在不安全的网络中对网络服务提供安全地传输环境,实现SSH
客户端和
SSH
服务器的连接,所以SSH
是基于客户端
-
服务器模式。
本次实验需要两台主机
1.搭建实验环境
搭建完成之后,检查主机网络配置。
主机

服务器

远程登录
[root@localhost Desktop]# ssh -l root 192.168.79.134
The authenticity of host '192.168.79.134 (192.168.79.134)' can't be established.
ED25519 key fingerprint is SHA256:qx7LZsZHbIzt7YQLfy7gq65S5tO9y1iK0aSgPPrZOHU.
This host key is known by the following other names/addresses:
~/.ssh/known_hosts:1: 192.168.79.135
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.79.134' (ED25519) to the list of known hosts.
root@192.168.79.134's password:
Activate the web console with: systemctl enable --now cockpit.socket
Register this system with Red Hat Insights: insights-client --register
Create an account or view all your systems at https://red.ht/insights-dashboard
Last login: Mon Nov 18 01:11:21 2024
[root@localhost ~]#
验证远程登录
查看公钥私钥
模拟认证key出现问题
解决问题
SSH-KEY加密
sshd安全加固
SSHD服务主配置文件
保存退出,重启服务。