From eee5621b39cd951d5b03ef673e89bd468a930107 Mon Sep 17 00:00:00 2001 From: akanealw Date: Thu, 21 Dec 2023 20:44:22 -0600 Subject: [PATCH] added key files --- alpine/download-alpine-scripts.sh | 10 +++++----- debian/debian-configure-sshd.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/alpine/download-alpine-scripts.sh b/alpine/download-alpine-scripts.sh index 96c35e5..ee1da46 100755 --- a/alpine/download-alpine-scripts.sh +++ b/alpine/download-alpine-scripts.sh @@ -1,10 +1,10 @@ #!/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 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/* diff --git a/debian/debian-configure-sshd.sh b/debian/debian-configure-sshd.sh index 839686c..2d06ecb 100644 --- a/debian/debian-configure-sshd.sh +++ b/debian/debian-configure-sshd.sh @@ -57,6 +57,7 @@ if [ $isInFile -eq 0 ] chmod 600 /home/akanealw/.ssh/* fi + # authorized_keys root cp /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bak isInFile=$(cat /root/.ssh/authorized_keys | grep -c "gamingpc-root") @@ -80,6 +81,7 @@ if [ $isInFile -eq 0 ] chmod 600 /root/.ssh/authorized_keys fi + # config /home/akanealw/.ssh/ isInFile=$(cat /home/akanealw/.ssh/config | grep -c "*root") if [ $isInFile -eq 0 ] @@ -101,6 +103,7 @@ if [ $isInFile -eq 0 ] chmod 600 /home/akanealw/.ssh/* fi + # config /root/.ssh/ isInFile=$(cat /root/.ssh/config | grep -c "*root") if [ $isInFile -eq 0 ] @@ -122,5 +125,32 @@ if [ $isInFile -eq 0 ] fi +# server-akanealw +cat < /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 < /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 #systemctl restart sshd