1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| #!/bin/sh
yum -y install rsh rsh-server
systemctl restart rsh.socket
systemctl restart rlogin.socket
systemctl restart rexec.socket
cat > /root/.rhosts <<EOF
192.168.100.210 root
192.168.100.211 root
192.168.100.212 root
192.168.100.213 root
192.168.100.214 root
EOF
sed -i "/rsh/d" /etc/securetty
sed -i "/rexec/d" /etc/securetty
sed -i "/rlogin/d" /etc/securetty
cat >> /etc/securetty <<EOF
rsh
rexec
rlogin
EOF
|