欢迎访问本站,希望站内信息可以帮助到您!感兴趣的,可以加入我的知识星球,一起学习,一起进步!

centos7安装openssh-server

Linux 迷途小书童 0评论

更换yum

设置aliyunyum

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

如果系统中没有wget,也可以使用curl
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

清理缓存,更新系统

yum clean all
yum makecache
yum update

安装openssh-server

使用yum安装软件包

yum install openssh-server

启动、停止、查看状态

# 使能服务
systemctl enable sshd

# 启动服务
systemctl start sshd

# 停止服务
systemctl stop sshd

# 查看状态
systemctl status sshd
喜欢 (0)

您必须 登录 才能发表评论!