Linux 脚本配置密码

Linux, 操作系统  ·  2024-01-25

#!/bin/bash
echo root:密码 |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
 
上一篇:Oracle 基础命令
下一篇:VMware 产品密钥
评论