如果是 centOS, 需要使用 yum install 进行各种软件的安装
Ubantu 可以用 apt install
由于我使用的系统多为centos8,今后主要以centos8为例
yum install openssh-server
接下来我们要将ssh服务加入开机启动项,并运行
systemctl enable --now sshd
其中的 systemctl enable 是将服务加入开机启动项, --now 代表现在也立即启动该服务
此外,ssh服务默认在22号端口开启