Adding public key system to update script.

There should be no issue with this. The SSH server will already
advertise the keys to all connecting instances.
This commit is contained in:
James Patrick 2019-12-11 00:53:01 -05:00
parent 1bc305b48e
commit 0edd5d513a
4 changed files with 12 additions and 3 deletions

View File

@ -1,6 +1,6 @@
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
SOURCE := $(SRC_DIR)/config CONFIG_SRC := $(SRC_DIR)/config
TARGET := ~/.ssh/config CONFIG_TRGT := ~/.ssh/config
JPATRICK_KEY := ~/.ssh/git.jpatrick.io JPATRICK_KEY := ~/.ssh/git.jpatrick.io
include ../lib/shared.mk include ../lib/shared.mk
@ -9,10 +9,16 @@ install: | init update
init: init:
$(info => Setting up ssh) $(info => Setting up ssh)
$(mk_link) $(SOURCE) $(TARGET) $(mk_link) $(CONFIG_SRC) $(CONFIG_TRGT)
$(mk_link) $(SRC_DIR)/public_keys ~/.ssh/public_keys
$(MAKE) -C $(SRC_DIR) init_jpatrick_key $(MAKE) -C $(SRC_DIR) init_jpatrick_key
update: update:
cd ~/.ssh \
&& mkdir -p public_keys/`hostname` \
&& for i in *.pub ; do ; \
cp $$i public_keys/`hostname`/$$i ; \
done
remove: remove:
$(info => Remvoing ssh) $(info => Remvoing ssh)

View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHc429ju3N/DoIe7r4F35asaZeNv6/ZWPGXlQiEHUMtf zuk Tue Apr 16 21:54:38 EDT 2019

View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC9pheTZRF6Yo2Od0b8CyxLuazodEtB/5oAEDei8cBvi zuk: Sun 10 Nov 2019 11:50:45 AM EST

View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICmLHzD7WneJQEHCNgT5k/4wa8rM07yQVu8w7nH3dNU5 zuk: 20190430235108