剛買了台服務器,登錄時需要修改密碼;
https://cloud.tencent.com/document/product/1207/44569#ubuntu-.E7.B3.BB.E7.BB.9F.E5.A6.82.E4.BD.95.E4.BD.BF.E7.94.A8-root-.E7.94.A8.E6.88.B7.E7.99.BB.E5.BD.95.E5.AE.9E.E4.BE.8B.EF.BC.9F
但是到這里要修改sshd_config
文件可以允許密碼登錄的時候,發現修改完成,無法重啟
出現如下錯誤:
Failed to restart ssh.service: Unit ssh.service not found
實際是因為,版本問題導致,以上命令都是centos6里面的命令,在centos7需要用:
systemctl restart sshd
完美解決~~~