• ssh配置文件详情


    一.常见信息:

    Port 22  端口

    ListenAddress  监听的IP

    Protocol 2 SSH版本选择,选择2即可

    HostKey /etc/ssh/ssh_host_rsa__key 私钥保存位置

    ServerKeyBits  大小1024

    ServerFacility AUTH  日志记录ssh登陆情况

    #KeyRegenerationInterval 1h  重新生成服务器密钥的周期

    #ServerKeyBits 1024  服务器密钥的长度

    LogLevel INFO 记录sshd日志消息的级别

    #PermitRootLogin yes  是否允许root远程ssh登录

    #RSAAuthentication yes  设置是否开启ras密钥登录方式

    #PubkeyAuthentication yes  设置是否开启公钥验登录方式

    #AuthorizedKeysFile .ssh/authorized_keys  设置公钥验证文件的路径

    #PermitEmptyPasswords no  设置是否允许空密码的账号登录

    X11Forwarding yes  设置是否允许X11转发

    GSSAPIAuthentication yes  GSSAPI认证开启

    二:修改端口号

    port 211 

    三.服务器端安全配置选项

    PermitRootLogin yes #允许root的ssh登陆
    PubkeyAuthentication yes #是否使用公钥验证
    AuthorizeKeysFile .ssh/authorized_keys #公钥的保存位置
    PasswordAuthentication yes #允许使用密码验证登陆
    PermitEmptyPasswords no #不允许空密码登陆

    四.重启systemctl restart sshd.service

    五.拼接ssh

    ssh root@ip

  • 相关阅读:
    aspscheduler+uwsgi定时任务执行多次
    django定时任务
    django记录用户操作模块
    python缩小图片
    pymysql同时执行多条语句时报错
    MySQL8.0 修改密码
    linux中安装python3
    Mysql高性能
    Mysql高性能
    Mysql高性能
  • 原文地址:https://www.cnblogs.com/ellie-fy1111/p/14546977.html
Copyright © 2020-2023  润新知