diff options
Diffstat (limited to 'src/openssh/AuthorizedKeysCommand')
-rw-r--r-- | src/openssh/AuthorizedKeysCommand | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/openssh/AuthorizedKeysCommand b/src/openssh/AuthorizedKeysCommand new file mode 100644 index 0000000..de0732a --- /dev/null +++ b/src/openssh/AuthorizedKeysCommand | |||
@@ -0,0 +1,11 @@ | |||
1 | #!/bin/sh | ||
2 | username=$1 | ||
3 | shift | ||
4 | |||
5 | [ "$username" ] | ||
6 | cmd=/etc/ssh/user-$username.AnonymousForceCommand | ||
7 | [ -x "$cmd" ] || exit | ||
8 | |||
9 | key=$1 | ||
10 | shift | ||
11 | printf 'restrict,pty,command="%s" %s\n' "$cmd" "$key" | ||