NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
~~~ # 开启秘钥和密码认证 PermitRootLogin yes #允许root认证登录 PasswordAuthentication yes #允许密码认证 RSAAuthentication yes #秘钥认证 PubkeyAuthentication yes ~~~ ``` 'exec sh -c 'cd; umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys && (test -x /sbin/restorecon && /sbin/restorecon .ssh .ssh/authorized_keys >/dev/null 2>&1 || true)'' ``` ## 最小配置 ``` Port 11892 AcceptEnv LANG LC_* ChallengeResponseAuthentication no HostKey /etc/ssh/ssh_host_rsa_key PasswordAuthentication yes PermitRootLogin yes PrintMotd no Protocol 2 PubkeyAuthentication yes Subsystem sftp /usr/libexec/openssh/sftp-server SyslogFacility AUTHPRIV UseDNS no UsePAM yes UsePrivilegeSeparation yes X11Forwarding yes ```