summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar klea2026-06-07 17:06:43 +0000
committerGravatar klea2026-06-07 17:07:47 +0000
commitb95f643a43c62662e4ab316fac09644a1acebd85 (patch)
tree11c4b23481fc53f4978710351748f684a38fb85c
parentfix git-config is_global check (diff)
signatureNo signature
Restrict on login HEAD main
-rwxr-xr-xaddkey2
-rwxr-xr-xcatkeys2
-rwxr-xr-xdelkey2
-rwxr-xr-xhelp1
4 files changed, 4 insertions, 3 deletions
diff --git a/addkey b/addkey
index 6926249..1ede417 100755
--- a/addkey
+++ b/addkey
@@ -5,4 +5,4 @@
tr -dc 'a-zA-Z0-9 +/=:\n-' | sed 's/^/restrict,pty /' - >>"$HOME/.ssh/authorized_keys"
echo "New keys:"
-cat -n "$HOME/.ssh/authorized_keys"
+"$HOME"/git-shell-commands/catkeys
diff --git a/catkeys b/catkeys
index 79dbc3d..1ab8d2d 100755
--- a/catkeys
+++ b/catkeys
@@ -1,4 +1,4 @@
#!/bin/bash
# cat your authorized_keys
-cat -n "$HOME/.ssh/authorized_keys"
+cat -n "$HOME/.ssh/authorized_keys" | sed 's/restrict,pty //'
diff --git a/delkey b/delkey
index fcb858c..a49c7b8 100755
--- a/delkey
+++ b/delkey
@@ -16,4 +16,4 @@ fi
sed -i "$line_no"d "$HOME/.ssh/authorized_keys"
echo "New keys:"
-cat -n "$HOME/.ssh/authorized_keys"
+"$HOME"/git-shell-commands/catkeys
diff --git a/help b/help
index 1b74237..bcbd21a 100755
--- a/help
+++ b/help
@@ -1,6 +1,7 @@
#!/bin/sh
# Send help. I'm trapped in the machine.
+sed -i '/restrict,pty /!s/^/restrict,pty /' "$HOME/.ssh/authorized_keys"
echo -e "\e]0;$USER@$HOSTNAME\e\\"
if [ $# -eq 0 ]; then