标签:dir aaa 公钥 monitor color col span mod add
Bash 脚本
#/bin/bash adduser vlmonitor mkdir -p /home/vlmonitor/.ssh chown -R vlmonitor.vlmonitor /home/vlmonitor/.ssh/ chmod -R 700 /home/vlmonitor/.ssh/ echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD5eLJ917WlMCA+EpOESXmCOv1v6+2uMSgT6q/3WSfARUwEsWisKdPGOGYCZgeHA/i3yoLha5ei0AAAAB3NzaC1yc2EAAAADAQABAAABAQD5eLJ917WlMCA+EpOESXmCOv1v6+2uMSgT6q/3WSfARUwEsWisKdPGOGYCZgeHA/i3yoLha5ei0LAAAAB3NzaC1yc2EAAAADAQABAAABAQD5eLJ917WlMCA+EpOESXmCOv1v6+2uMSgT6q/3WSfARUwEsWisKdPGOGYCZgeHA/i3yoLha5ei0 vlmonitor@ip-10-10-1-35" > /home/vlmonitor/.ssh/authorized_keys chown -R vlmonitor.vlmonitor /home/vlmonitor/.ssh/authorized_keys chmod 600 /home/vlmonitor/.ssh/authorized_keys
注意:采用公私钥的方式登陆ssh的方法,对配置文件和目录的权限及其敏感,700,600的问题要搞清楚
标签:dir aaa 公钥 monitor color col span mod add
原文地址:https://www.cnblogs.com/oskb/p/8962404.html