Skip to content
Permalink
Browse files

SSH Key Pair Cleanup

  • Loading branch information...
NEMS Linux
NEMS Linux committed Aug 24, 2019
1 parent cd84e59 commit e685420ced08c94ab1bc4be42d6681ee19614980
Showing with 7 additions and 6 deletions.
  1. +7 −6 nems-cleanup.sh
@@ -31,12 +31,10 @@ else

platform=$(/usr/local/share/nems/nems-scripts/info.sh platform)

if (( $platform != 22 )); then
# Check if nemsadmin exists, and create it if not
if [ ! -d /home/nemsadmin ]; then
# Create the nemsadmin user
/root/nems/nems-admin/build/030-user
fi
# Check if nemsadmin exists, and create it if not
if [ ! -d /home/nemsadmin ]; then
# Create the nemsadmin user
/root/nems/nems-admin/build/030-user
fi

if (( $platform >= 0 )) && (( $platform <= 9 )); then
@@ -139,6 +137,9 @@ else
rm /var/log/lastlog
touch /var/log/lastlog

# Remove Robbie's key pair
rm /home/nemsadmin/.ssh/authorized_keys

if (( $platform != 22 )); then
# Remove DNS Resolver config (will be auto-generated on first boot)
echo "# Default resolv.conf file created by NEMS Admin

0 comments on commit e685420

Please sign in to comment.
You can’t perform that action at this time.