栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Ubuntu20.04.3设SSH服务器

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Ubuntu20.04.3设SSH服务器

一、安装opensshd-server
可以直接 执行命令
sudo  apt-get install openssh*
如果出现以下错误:
The following packages have unmet dependencies:
 openssh-server : Depends: openssh-client (= 1:8.2p1-4ubuntu0.2)
 openssh-sftp-server : Depends: openssh-client (= 1:8.2p1-4ubuntu0.2)
 openssh-tests : Depends: openssh-client (= 1:8.2p1-4ubuntu0.2)
E: Unable to correct problems, you have held broken packages.
则先执行以下命令
sudo  apt-get install openssh-client=1:8.2p1-4ubuntu0.2
再执行命令
sudo  apt-get install openssh*

二、安装完成后,修改配置文件
vim /etc/ssh/sshd_config
将#Port 22改为Port 22

将#PermitRootLogin prohibit-password
改为
PermitRootLogin yes

三、最后重启服务使其生效
 ./etc/init.d/ssh restart

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/681580.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号