一、SSH服务安装
1. 安装ssh服务
如果你用的是redhat,fedora,centos等系列linux发行版,那么敲入以下命令:
sudo yum install sshd
sudo yum install openssh-server
如果你使用的是debian,ubuntu,linux mint等系列的linux发行版,那么敲入以下命令:
sudo apt-get install sshd
sudo apt-get install openssh-server
2. 启动ssh服务
service sshd start
or
/bin/systemctl restart sshd.service
or
/etc/init.d/sshd start
or
sudo systemctl restart sshd
设置开机运行
chkconfig sshd on
查看ssh服务的状态
sudo service sshd status
如果出现 Loaded: error (Reason: No such file or directory) 提示的话,说名没有安装ssh服务,按照第一步:安装ssh服务。
如果出现 Active: inactive (dead) 说明已经安装了ssh服务,但是没有开启。按照第二步:开启ssh服务。
关注
打赏