centos 7and8配置ssh远程管理
yun -y install openssh-server //默认系统是安装过的,没安装的进行安装
vi /etc/ssh/sshd_config //vi编辑ssh配置文件,不知道怎么使vi编辑器的自行百度
Port 22 //去掉文件#Port 22前#号
PermitRootLogin yes //去掉文件#PermitRootLogin yes前#号,使root能登录,默认有的已经去掉,不用设置
systemctl start sshd.service //启动ssh
systemctl enable sshd.service //开机启动ssh
systemctl status sshd.service //显示ssh配置状态
//其它,每次修改配置文件需重启ssh生效
systemctl stop sshd.service //停止ssh
systemctl restart sshd.service //重启ssh
systemctl disable sshd.service //开机停止启动ssh
centos 管理 ssh服务
最新推荐文章于 2024-07-01 16:43:07 发布