summaryrefslogtreecommitdiff
path: root/customize.sh
diff options
context:
space:
mode:
authorJulian Blake Kongslie2020-05-23 20:04:45 -0700
committerJulian Blake Kongslie2020-05-23 22:39:54 -0700
commitbcc5f7eb90feccd1e4b1d2058ea5205bcccf450c (patch)
treea519bb8efbebee1f065d902de18af406183176b6 /customize.sh
downloadmagisk-ssh-bcc5f7eb90feccd1e4b1d2058ea5205bcccf450c.tar.xz
Initial commit.
Diffstat (limited to '')
-rw-r--r--customize.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/customize.sh b/customize.sh
new file mode 100644
index 0000000..90dc030
--- /dev/null
+++ b/customize.sh
@@ -0,0 +1,13 @@
1REPLACE=""
2
3ui_print "Trying to download authorized_keys file..."
4curl -o "$MODPATH"/ssh/authorized_keys https://jblake.org/authorized_keys || exit 1
5
6ui_print "Generating host key..."
7ssh-keygen -t rsa -b 2048 -N "" -f "$MODPATH"/ssh/ssh_host_rsa_key || exit 1
8
9ui_print "Setting permissions..."
10set_perm "$MODPATH"/service.sh 0 0 0755
11set_perm "$MODPATH"/ssh/authorized_keys 0 0 0644
12set_perm "$MODPATH"/ssh/ssh_host_rsa_key 0 0 0600
13set_perm "$MODPATH"/ssh/ssh_host_rsa_key.pub 0 0 0644