配置文件在/etc/sshd_config,注意只有root可rw,其他所有用户权限为---。

配置说明可参考man sshd_config。

如果更改了服务器端口号,并且启用了SELinux,需要执行以下命令:

semanage port -a -t ssh_port_t -p tcp YOUR_TCP_PORT

# 使用以下命令查看更改效果

# semanage port -l | grep "ssh"

# ssh_port_t tcp YOUR_NEW_PORT, 22

# 该更改复位后保持有效。

# 如需删除,将-a替换为-d即可:

# semanage port -d -t ssh_port_t -p tcp YOUR_TCP_PORT

# 使用semanage port -d -t ssh_port_t -p tcp 22无法删除port 22,

# 大意是说port 22由policy定义。待查。

建议更改默认端口。

另外几个建议更改的配置:

# The time after which the server disconnects if the user has not successfully logged in.

LoginGraceTime    30s

# Specifies the maximum number of authentication attempts permitted per connection.

# Once the number of failures reaches half this value, additional failures are logged.

MaxAuthTries    4

# 限制root远程登录

PermitRootLogin no

最新文章

  1. Java多线程之构造与发布
  2. Google 开源技术protobuf
  3. php中explode与split的区别介绍
  4. JQuery实现对勾事件代码
  5. [翻译]:SQL死锁-死锁排除
  6. js 中escape,encodeURI,encodeURIComponent的区别
  7. IOS-TextField控件详解
  8. Rainyday.js – 傻眼了!竟然有如此逼真的雨滴效果
  9. C#全角转换成半角并检查
  10. hibernate对象关系实现(三)多对多实现
  11. C# 自定义重绘TabControl
  12. scp命令使用
  13. ODAC with Oracle Developer Tools for Visual Studio
  14. Apple-Watch开发
  15. 问题解决: WordPress on SAE注册邮件无法发送
  16. The table name must be enclosed in double quotation marks or sqare bracket while accessing EXCEL by
  17. H5中用js让页面全屏
  18. Axure安装、破解、汉化全套
  19. 关于deepin linux15.6-15.9.1系统播放视频卡顿解决办法
  20. fiddler2抓包数据工具使用教程

热门文章

  1. 极大极小搜索思想+(α/β)减枝 【转自-----https://blog.csdn.net/hzk_cpp/article/details/79275772】
  2. Codeforces 1005D:Polycarp and Div 3
  3. 在学习linux基础入门时的一些问题总结(1)
  4. debian 安装使用NTP
  5. Js判断字符的种类
  6. 【JVM】jvm虚拟机参数解析
  7. Mybatis二(高级部分)
  8. 在公司上wifi
  9. taro 最佳实践
  10. TypeScript 之 声明文件的使用