sudo su cd /root 修改authorized_keys文件(即ssh证书) vi .ssh/authorized_keys 把ssh-rsa之前的文件都删除掉. 编辑ssh配置文件 nano /etc/ssh/sshd_config 找到PermitRootLogin, 把前面的#去掉 改成下面这样 PermitRootLogin yes ctrl+x 保存退出 选择y 然后回车 然后 reboot 重启服务器。就可以使用root用户名配合秘钥登入了 iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT iptables -F apt-get purge netfilter-persistent reboot 重启 #更新系统 apt update -y apt install -y curl apt install -y socat apt-get purge netfilter-persistent. #开放端口 #安装脚本 curl https://get.acme.sh | sh ~/.acme.sh/acme.sh --register-account -m xxxx@163.com #放行80端口 iptables -I INPUT -p tcp --dport 80 -j ACCEPT #申请证书 ~/.acme.sh/acme.sh --issue -d xgoogle.com --standalone ~/.acme.sh/acme.sh --installcert -d xgoogle.com --key-file /root/private.key --fullchain-file /root/cert.crt #Xray一键代码 bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh) #放行端口 iptables -I INPUT -p tcp --dport 54321 -j ACCEPT iptables -I INPUT -p tcp --dport 443 -j ACCEPT ------------------------------------------------------------- FinalShell下载:http://www.hostbuf.com/downloads/finalshell_install.exe FinalShell-MAC版下载:http://www.hostbuf.com/downloads/finalshell_install.pkg



