diff options
| author | Julian Blake Kongslie | 2020-05-23 20:04:45 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2020-05-23 22:39:54 -0700 |
| commit | bcc5f7eb90feccd1e4b1d2058ea5205bcccf450c (patch) | |
| tree | a519bb8efbebee1f065d902de18af406183176b6 /customize.sh | |
| download | magisk-ssh-bcc5f7eb90feccd1e4b1d2058ea5205bcccf450c.tar.xz | |
Initial commit.
Diffstat (limited to 'customize.sh')
| -rw-r--r-- | customize.sh | 13 |
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 @@ | |||
| 1 | REPLACE="" | ||
| 2 | |||
| 3 | ui_print "Trying to download authorized_keys file..." | ||
| 4 | curl -o "$MODPATH"/ssh/authorized_keys https://jblake.org/authorized_keys || exit 1 | ||
| 5 | |||
| 6 | ui_print "Generating host key..." | ||
| 7 | ssh-keygen -t rsa -b 2048 -N "" -f "$MODPATH"/ssh/ssh_host_rsa_key || exit 1 | ||
| 8 | |||
| 9 | ui_print "Setting permissions..." | ||
| 10 | set_perm "$MODPATH"/service.sh 0 0 0755 | ||
| 11 | set_perm "$MODPATH"/ssh/authorized_keys 0 0 0644 | ||
| 12 | set_perm "$MODPATH"/ssh/ssh_host_rsa_key 0 0 0600 | ||
| 13 | set_perm "$MODPATH"/ssh/ssh_host_rsa_key.pub 0 0 0644 | ||
