added key files
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
#!/bin/ash
|
#!/bin/ash
|
||||||
|
|
||||||
wget http://192.168.1.50/scripts/alpine/alpine-essentials.sh
|
|
||||||
wget http://192.168.1.50/scripts/alpine/alpine-install-docker.sh
|
|
||||||
wget http://192.168.1.50/scripts/alpine/alpine-user-customizations.sh
|
|
||||||
|
|
||||||
mkdir ~/scripts > /dev/null 2>&1
|
mkdir ~/scripts > /dev/null 2>&1
|
||||||
rm ~/scripts/alpine-* > /dev/null 2>&1
|
rm ~/scripts/alpine-* > /dev/null 2>&1
|
||||||
mv alpine-* scripts/
|
|
||||||
|
wget -qO ~/scripts http://192.168.1.50/scripts/alpine/alpine-essentials.sh
|
||||||
|
wget -qO ~/scripts http://192.168.1.50/scripts/alpine/alpine-install-docker.sh
|
||||||
|
wget -qO ~/scripts http://192.168.1.50/scripts/alpine/alpine-user-customizations.sh
|
||||||
|
|
||||||
chmod +x ~/scripts/*
|
chmod +x ~/scripts/*
|
||||||
|
|||||||
30
debian/debian-configure-sshd.sh
vendored
30
debian/debian-configure-sshd.sh
vendored
@@ -57,6 +57,7 @@ if [ $isInFile -eq 0 ]
|
|||||||
chmod 600 /home/akanealw/.ssh/*
|
chmod 600 /home/akanealw/.ssh/*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# authorized_keys root
|
# authorized_keys root
|
||||||
cp /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bak
|
cp /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bak
|
||||||
isInFile=$(cat /root/.ssh/authorized_keys | grep -c "gamingpc-root")
|
isInFile=$(cat /root/.ssh/authorized_keys | grep -c "gamingpc-root")
|
||||||
@@ -80,6 +81,7 @@ if [ $isInFile -eq 0 ]
|
|||||||
chmod 600 /root/.ssh/authorized_keys
|
chmod 600 /root/.ssh/authorized_keys
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# config /home/akanealw/.ssh/
|
# config /home/akanealw/.ssh/
|
||||||
isInFile=$(cat /home/akanealw/.ssh/config | grep -c "*root")
|
isInFile=$(cat /home/akanealw/.ssh/config | grep -c "*root")
|
||||||
if [ $isInFile -eq 0 ]
|
if [ $isInFile -eq 0 ]
|
||||||
@@ -101,6 +103,7 @@ if [ $isInFile -eq 0 ]
|
|||||||
chmod 600 /home/akanealw/.ssh/*
|
chmod 600 /home/akanealw/.ssh/*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# config /root/.ssh/
|
# config /root/.ssh/
|
||||||
isInFile=$(cat /root/.ssh/config | grep -c "*root")
|
isInFile=$(cat /root/.ssh/config | grep -c "*root")
|
||||||
if [ $isInFile -eq 0 ]
|
if [ $isInFile -eq 0 ]
|
||||||
@@ -122,5 +125,32 @@ if [ $isInFile -eq 0 ]
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# server-akanealw
|
||||||
|
cat <<EOF > /home/akanealw/.ssh/server-akanealw
|
||||||
|
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||||
|
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
||||||
|
QyNTUxOQAAACBgIsNLEMcU4P8wZvx8+Cy47Yrhn3nxdr6IBpGHFqMeEgAAAJgPgcu8D4HL
|
||||||
|
vAAAAAtzc2gtZWQyNTUxOQAAACBgIsNLEMcU4P8wZvx8+Cy47Yrhn3nxdr6IBpGHFqMeEg
|
||||||
|
AAAEDalS9Q+0KRMMqOXnie/d0uckbLIePYYY7DOqs8cJ7UF2Aiw0sQxxTg/zBm/Hz4LLjt
|
||||||
|
iuGfefF2vogGkYcWox4SAAAAD3NlcnZlci1ha2FuZWFsdwECAwQFBg==
|
||||||
|
-----END OPENSSH PRIVATE KEY-----
|
||||||
|
EOF
|
||||||
|
chown akanealw:akanealw /home/akanealw/.ssh/*
|
||||||
|
chmod 600 /home/akanealw/.ssh/*
|
||||||
|
|
||||||
|
|
||||||
|
# server-root
|
||||||
|
cat <<EOF > /root/.ssh/server-root
|
||||||
|
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||||
|
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
||||||
|
QyNTUxOQAAACB1osOZVc0CGYmXNUj6Ybx4XUqRZfVDel5uM5xaqucbOAAAAJAnxfYyJ8X2
|
||||||
|
MgAAAAtzc2gtZWQyNTUxOQAAACB1osOZVc0CGYmXNUj6Ybx4XUqRZfVDel5uM5xaqucbOA
|
||||||
|
AAAEBUjm9GcUvXzKnpiw0aYd+Ca7+LAWuq0u6l0FjPQyQjd3Wiw5lVzQIZiZc1SPphvHhd
|
||||||
|
SpFl9UN6Xm4znFqq5xs4AAAAC3NlcnZlci1yb290AQI=
|
||||||
|
-----END OPENSSH PRIVATE KEY-----
|
||||||
|
EOF
|
||||||
|
chmod 600 /root/.ssh/*
|
||||||
|
|
||||||
|
|
||||||
# restart sshd
|
# restart sshd
|
||||||
#systemctl restart sshd
|
#systemctl restart sshd
|
||||||
|
|||||||
Reference in New Issue
Block a user