zoukankan      html  css  js  c++  java
  • freebsd配置sshd_conf文件

    以下为sshd配置信息

    root@freebsd:/etc/ssh # cd /etc/ssh/
    root@freebsd:/etc/ssh # egrep -v '^$|^#' sshd_config
    PermitRootLogin yes #允许root远程登录
    MaxAuthTries 6000 #认证次数
    PubkeyAuthentication no #禁用公钥
    PermitEmptyPasswords no #禁用空密码
    UsePAM no #禁止使用PAM
    UseDNS no #禁止使用DNS
    Subsystem	sftp	/usr/libexec/sftp-server #远程ftp
    	AllowTcpForwarding yes #允许tcp连接
    PasswordAuthentication yes #开启密码验证
    AllowUsers root #允许root登录
    

    重启sshd服务

    root@freebsd:/etc/ssh # /etc/rc.d/sshd restart
    Performing sanity check on sshd configuration.
    Stopping sshd.
    Waiting for PIDS: 5717.
    Performing sanity check on sshd configuration.
    Starting sshd.
    

    登录成功

    [C:~]$ ssh root@192.168.148.40
    
    
    Connecting to 192.168.148.40:22...
    Connection established.
    To escape to local shell, press 'Ctrl+Alt+]'.
    
    WARNING! The remote SSH server rejected X11 forwarding request.
    Last login: Wed Nov 27 23:12:24 2019 from 192.168.148.2
    FreeBSD 12.0-RELEASE r341666 GENERIC 
    
    Welcome to FreeBSD!
    
    Release Notes, Errata: https://www.FreeBSD.org/releases/
    Security Advisories:   https://www.FreeBSD.org/security/
    FreeBSD Handbook:      https://www.FreeBSD.org/handbook/
    FreeBSD FAQ:           https://www.FreeBSD.org/faq/
    Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
    FreeBSD Forums:        https://forums.FreeBSD.org/
    
    Documents installed with the system are in the /usr/local/share/doc/freebsd/
    directory, or can be installed later with:  pkg install en-freebsd-doc
    For other languages, replace "en" with a language code like de or fr.
    
    Show the version of FreeBSD installed:  freebsd-version ; uname -a
    Please include that output and any error messages when posting questions.
    Introduction to manual pages:  man man
    FreeBSD directory layout:      man hier
    
    Edit /etc/motd to change this login announcement.
    root@freebsd:~ # 
    
  • 相关阅读:
    范畴定义
    泛函编程(0)-什么是泛函编程
    函数式语言的特性
    理解函数式编程
    未阅归档
    monad-本质解释- a monad is a design pattern--monad与泛型相关
    打印管理系统
    函数式JS: 原来promise是这样的monad
    Promise是Monad吗?
    Scala和范畴论 -- 对Monad的一点认识
  • 原文地址:https://www.cnblogs.com/anyux/p/11947429.html
Copyright © 2011-2022 走看看