linux秘钥登入切换为密码登入

echo root:YourPasswordHere |sudo chpasswd root
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo service sshd restart

 

赞 (0)

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址