🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
~~~ # 开启秘钥和密码认证 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 ```