• 修改SSH端口


    修改的是 /etc/ssh/sshd_config 文件,(第一次修改的是 ssh_config 文件,结果重起ssh服务,怎么没生效呢?自己还纳闷了,后来google里跑了一下,答案就出来了。
    [root@linux ~]# vi /etc/ssh/sshd_config
    # $OpenBSD: sshd_config,v 1.69 2004/05/23 23:59:53 dtucker Exp $

    # This is the sshd server system-wide configuration file. See
    # sshd_config(5) for more information.

    # This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

    # The strategy used for options in the default sshd_config shipped with
    # OpenSSH is to specify options with their default value where
    # possible, but leave them commented. Uncommented options change a
    # default value.

    Port 2222 //以前这个前面是有 # 号的,而且默认是 22 ,修改一下就ok了
    #Protocol 2,1
    #ListenAddress 0.0.0.0
    #ListenAddress ::

    # HostKey for protocol version 1
    #HostKey /etc/ssh/ssh_host_key
    # HostKeys for protocol version 2
    #HostKey /etc/ssh/ssh_host_rsa_key
    #HostKey /etc/ssh/ssh_host_dsa_key


    4、重起ssh服务,修改端口才生效
    [root@linux ~]# service sshd restart
    Stopping sshd: [ OK ]
    Starting sshd: [ OK ]
    [root@linux ~]#

    5、为了检验是否正确,可以使用 netstat -an 命令查看一下
  • 相关阅读:
    JS・TextArea 字符串长度限制
    JavaScript面试题目集锦
    IE内存泄露分析
    JS动态添加样式和脚本
    取消锚(<a/>)点击后页面跳转的几种方法
    JS代码片段整理
    IE缓存问题的解决方法
    字符串与数字 转换
    如何安装和配置Cassandra
    字类和超类的转化问题
  • 原文地址:https://www.cnblogs.com/rooney/p/1459692.html
Copyright © 2020-2023  润新知