yum install -y openssh-clients openssh-server initscripts net-tools
# 修改/etc/ssh/sshd_config文件
PermitRootLogin yes
UsePAM no
# 启动sshd服务
systemctl restart sshd
#修改密码
echo "root:root" | chpasswd
测试ssh服务:
ssh root@$ip
yum install -y openssh-clients openssh-server initscripts net-tools
# 修改/etc/ssh/sshd_config文件
PermitRootLogin yes
UsePAM no
# 启动sshd服务
systemctl restart sshd
#修改密码
echo "root:root" | chpasswd
测试ssh服务:
ssh root@$ip