diff --git a/ssh-utils/README.md b/ssh-utils/README.md index 4685da0..6c8bcec 100644 --- a/ssh-utils/README.md +++ b/ssh-utils/README.md @@ -2,13 +2,18 @@ title: SSH Utils homepage: https://webinstall.dev/ssh-utils tagline: | - SSH Utils: Because --help takes to long. + SSH Utils: Because --help takes too long. --- ## Cheat Sheet -> SSH Utils includes shortcut commands for some common tasks, including -> `ssh-pubkey`, `ssh-setpass`, `ssh-adduser`, and `sshd-prohibit-password` +> SSH Utils includes shortcut commands for common tasks. + +- [ssh-adduser](../ssh-adduser/) +- [ssh-authorize](../ssh-authorize/) +- [ssh-pubkey](../ssh-pubkey/) +- [ssh-setpass](../ssh-setpass/) +- [sshd-prohibit-password](../sshd-prohibit-password/) **ssh-pubkey**: @@ -50,7 +55,8 @@ Enforces security for `/etc/ssh/sshd_config` **ssh-authorize**: -Adds public ssh keys from a string, file, or url to `~/.ssh/authorized_keys` to allow the owner(s) of the keys access to the system to which they're added. +Adds public ssh keys from a string, file, or url to `~/.ssh/authorized_keys` to +allow the owner(s) of the keys access to the system to which they're added. Also performs various checks to prevent errors. diff --git a/ssh-utils/install.sh b/ssh-utils/install.sh index 2f22f89..e7f1c89 100644 --- a/ssh-utils/install.sh +++ b/ssh-utils/install.sh @@ -3,31 +3,35 @@ set -e set -u __install_ssh_utils() { - rm -f \ - "$HOME/.local/bin/ssh-authorize" \ - "$HOME/.local/bin/ssh-pubkey" \ - "$HOME/.local/bin/ssh-setpass" \ - "$HOME/.local/bin/ssh-adduser" \ - "$HOME/.local/bin/sshd-prohibit-password" - # done - + rm -f "$HOME/.local/bin/ssh-authorize" webi_download \ "$WEBI_HOST/packages/ssh-authorize/ssh-authorize" \ "$HOME/.local/bin/ssh-authorize" - webi_download \ - "$WEBI_HOST/packages/ssh-pubkey/ssh-pubkey.sh" \ - "$HOME/.local/bin/ssh-pubkey" - webi_download \ - "$WEBI_HOST/packages/ssh-setpass/ssh-setpass.sh" \ - "$HOME/.local/bin/ssh-setpass" + chmod a+x "$HOME/.local/bin/ssh-authorize" + + rm -rf "$HOME/.local/bin/ssh-adduser" webi_download \ "$WEBI_HOST/packages/ssh-adduser/ssh-adduser.sh" \ "$HOME/.local/bin/ssh-adduser" + chmod a+x "$HOME/.local/bin/ssh-adduser" + + rm -rf "$HOME/.local/bin/ssh-pubkey" + webi_download \ + "$WEBI_HOST/packages/ssh-pubkey/ssh-pubkey.sh" \ + "$HOME/.local/bin/ssh-pubkey" + chmod a+x "$HOME/.local/bin/ssh-pubkey" + + rm -rf "$HOME/.local/bin/ssh-setpass" + webi_download \ + "$WEBI_HOST/packages/ssh-setpass/ssh-setpass.sh" \ + "$HOME/.local/bin/ssh-setpass" + chmod a+x "$HOME/.local/bin/ssh-setpass" + + rm -rf "$HOME/.local/bin/sshd-prohibit-password" webi_download \ "$WEBI_HOST/packages/sshd-prohibit-password/sshd-prohibit-password" \ "$HOME/.local/bin/sshd-prohibit-password" - - chmod a+x "$HOME/.local/bin/ssh-"* + chmod a+x "$HOME/.local/bin/sshd-prohibit-password" } __install_ssh_utils