added key files
This commit is contained in:
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/*
|
||||
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 <<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
|
||||
#systemctl restart sshd
|
||||
|
||||
Reference in New Issue
Block a user