systemctl enable ssh
ssh就是服务

然后运行下面的代码确认是否已经添加进去

 systemctl list-unit-files | grep ssh

就会显示以下状态,显示enable就是已经开启

ssh.service                            enabled 
ssh@.service                           static  
sshd.service                           enabled 
ssh.socket                             disabled
Last modification:February 11th, 2021 at 03:08 am
如果觉得我的文章对你有用,请随意赞赏