当前位置首页 > Fedora知识

fedora27安装ssh

阅读次数:288 次  来源:admin  发布时间:

Fedora安装sshd

先确认是否已安装ssh服务:

[root@localhost ~]# rpm -qa | grep openssh-server

openssh-server-5.3p1-19.fc12.i686 (这行表示已安装)

若未安装ssh服务,可输入

#yum install openssh-server

进行安装

2、修改配置文件

#vi /etc/ssh/sshd_config

Port 22 监听的端口号,默认是22,可以自定义。

Protocol 2 支持的协议,默认就好,不用修改

PermitRootLogin yes 是否允许root直接登录,最好设置为no

MMaxAuthTries 6 最大登录数,默认是6,建议设置为3,防止别人密码穷举。

To start the sshd daemon, type the following at a shell prompt:

ystemctl start sshd.service

To stop the running sshd daemon, use the following command:

ystemctl stop sshd.service

If you want the daemon to start automatically at the boot time, type:

ystemctl enable sshd.service

Refer to Chapter 7, Services and Daemons for more information on how to configure services in Fedora.

上一篇:『现学现忘』Docker基础—22、使用Docker安装Nginx
下一篇:让时间处理简单化【第三方扩展类库org.apache.commons.lang.time】