ssh开启,centOS7

1、先确定虚拟机是否装了openssh-server,执行 yum list installed |grep openssh-server 查看是否安装

bash 复制代码
[root@localhost ~]# yum list installed |grep openssh-server
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
openssh-server.x86_64                 7.4p1-21.el7                     @anaconda

这里显示已经安装,如果没有任何输出表示没有安装 , 执行 yum install openssh-server 命令安装

2、确定安装之后修改配置文件 vi /etc/ssh/sshd_config

按i ,进去编辑; 按esc键,然后输入 :wq ,编辑完毕


修改完配置保存

3、开启服务

systemctl start sshd.service

4、查看服务状态

systemctl status sshd.service

5.登陆

相关推荐
wow_DG1 小时前
【运维✨】云服务器公网 IP 迷雾:为什么本机看不到那个地址?
运维·服务器·tcp/ip
yuanManGan1 小时前
走进Linux的世界:初识操作系统(Operator System)
android·linux·运维
i_am_a_div_日积月累_2 小时前
jenkins打包报错
运维·rust·jenkins·jenkins打包报错
GIOTTO情2 小时前
舆情处置的自动化实践:基于Infoseek舆情系统的技术解析与落地指南
运维·自动化·linq
Thexhy2 小时前
在 CentOS 7 的 Linux 系统中配置 NFS
linux·运维·学习·centos
曹天骄2 小时前
Let’s Encrypt 证书申请与多服务器 HTTPS 配置指南
运维·服务器·https
lang201509282 小时前
如何在 Linux 中获取更多信息
linux·运维·服务器
DeBuggggggg2 小时前
linux 安装Python3.9 且支持SSL
linux·运维·ssl
我是标同学2 小时前
vmware17安装ubuntu2204版本qemu运行armv8处理器uboot运行调试(包括windows)的一些工作
linux·运维·服务器
杨云龙UP2 小时前
【MySQL迁移】MySQL数据库迁移实战(利用mysqldump从Windows 5.7迁至Linux 8.0)
linux·运维·数据库·mysql·mssql