summaryrefslogtreecommitdiff
path: root/src/AuthorizedKeysCommand
diff options
context:
space:
mode:
Diffstat (limited to 'src/AuthorizedKeysCommand')
-rwxr-xr-xsrc/AuthorizedKeysCommand8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/AuthorizedKeysCommand b/src/AuthorizedKeysCommand
index 6bf0ec9..de0732a 100755
--- a/src/AuthorizedKeysCommand
+++ b/src/AuthorizedKeysCommand
@@ -1,7 +1,11 @@
1#!/bin/sh 1#!/bin/sh
2cmd=/etc/ssh/user-d.AnonymousForceCommand 2username=$1
3shift
4
5[ "$username" ]
6cmd=/etc/ssh/user-$username.AnonymousForceCommand
3[ -x "$cmd" ] || exit 7[ -x "$cmd" ] || exit
4 8
5key=$1 9key=$1
6shift 10shift
7printf 'restrict,pty,command="%s" %s\n' "$cmd $*" "$key" 11printf 'restrict,pty,command="%s" %s\n' "$cmd" "$key"