From bcc5f7eb90feccd1e4b1d2058ea5205bcccf450c Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sat, 23 May 2020 20:04:45 -0700 Subject: Initial commit. --- customize.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 customize.sh (limited to 'customize.sh') diff --git a/customize.sh b/customize.sh new file mode 100644 index 0000000..90dc030 --- /dev/null +++ b/customize.sh @@ -0,0 +1,13 @@ +REPLACE="" + +ui_print "Trying to download authorized_keys file..." +curl -o "$MODPATH"/ssh/authorized_keys https://jblake.org/authorized_keys || exit 1 + +ui_print "Generating host key..." +ssh-keygen -t rsa -b 2048 -N "" -f "$MODPATH"/ssh/ssh_host_rsa_key || exit 1 + +ui_print "Setting permissions..." +set_perm "$MODPATH"/service.sh 0 0 0755 +set_perm "$MODPATH"/ssh/authorized_keys 0 0 0644 +set_perm "$MODPATH"/ssh/ssh_host_rsa_key 0 0 0600 +set_perm "$MODPATH"/ssh/ssh_host_rsa_key.pub 0 0 0644 -- cgit v1.2.3