mkdir /root/.ssh && cd /root/.ssh && touch authorized_keys cat >> /root/.ssh/authorized_keys <<eof 此处是公钥信息 eof chmod 600 /root/.ssh/authorized_keys sed -i "s/PermitRootLogin no/PermitRootLogin yes/g" /etc/ssh/sshd_config systemctl restart sshd
mkdir /root/.ssh && cd /root/.ssh && touch authorized_keys cat >> /root/.ssh/authorized_keys <<eof 此处是公钥信息 eof chmod 600 /root/.ssh/authorized_keys sed -i "s/PermitRootLogin no/PermitRootLogin yes/g" /etc/ssh/sshd_config systemctl restart sshd