summaryrefslogtreecommitdiff
path: root/src/AuthorizedKeysCommand
blob: de0732a7a35af78b21edd02fe3b49cf3e4457482 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
username=$1
shift

[ "$username" ]
cmd=/etc/ssh/user-$username.AnonymousForceCommand
[ -x "$cmd" ] || exit

key=$1
shift
printf 'restrict,pty,command="%s" %s\n' "$cmd" "$key"