请问星辰ipv6的cloud-init正确使用姿势

查看 59|回复 2
作者:Lison   
之前的星辰都是用debian用户和密钥登录的,昨天搞sftp把home目录权限设置成了777,现在通过debian用ssh登不上了。
打算用cloud-init设置回目录权限或者允许root登录好像也不行。
用过了下列几个cloud-init。
#!/bin/bash
apt install sudo -y
sudo echo root:新密码\n新密码" | passwd 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
users:
  - name: root
    plain_text_passwd: '密码'
    lock_passwd: false
#!/bin/bash
chmod 755 /home
然后用root、debian、密码密钥各种方式都登录不上去,请问大佬们我的姿势是否有问题 。请问还有什么办法能拯救小鸡?

密钥, 星辰, 都是

Lison
OP
  
刚上控制台看,页面显示cloud-init还挂了。。。
[
FAILED
] Failed to start Execute cloud user/final scripts.
See 'systemctl status cloud-final.service' for details.
[  
OK  
] Reached target Cloud-init target.
mlifree   
我就是这样,然后法国机没有了,技术不当
您需要登录后才可以回帖 登录 | 立即注册

返回顶部