您当前的位置: 首页 >  linux

wespten

暂无认证

  • 2浏览

    0关注

    899博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Linux安装与配置SSH服务

wespten 发布时间:2022-07-24 20:58:09 ,浏览量:2

一、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服务。

关注
打赏
1665965058
查看更多评论
立即登录/注册

微信扫码登录

0.3636s