1. 下载资源
# 更新依赖包(目的主要是为了是最新的依赖包)
yum update
# 安装OpenSSH服务器。
yum instal openssh-server
2. 修改配置
# 进入到 /etc/ssh 目录下
cd /etc/ssh/
# 修改sshd_config文件
vi sshd_config
# 确保 sshd_config 文件中,包含该行:Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem sftp /usr/lib/openssh/sftp-server
3.启动SSH服务
systemctl start ssh
# 或
systemctl start shhd
4. 设置开机自动启动
systemctl enable ssh
# 或
systemctl enable sshd