欢迎访问我的网站,希望内容对您有用,感兴趣的可以加入免费知识星球。

centos7安装openssh-server

Linux 迷途小书童 3年前 (2021-03-06) 3092次浏览 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)

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

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

请关闭 Adblock 等类似浏览器插件,然后刷新页面访问,感谢您的支持!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.