Dec 2902:13:04 localvm sshd[30468]: debug1: /usr/local/etc/test.sh:1: matching key found: RSA SHA256:wbzp2QGD7AsFUj8R5rXZCFEnzsq7sJX4nwxtA9yrLQQ Dec 2902:13:04 localvm sshd[30468]: debug1: /usr/local/etc/test.sh:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding Dec 2902:13:04 localvm sshd[30468]: Accepted key RSA SHA256:wbzp2QGD7AsFUj8R5rXZCFEnzsq7sJX4nwxtA9yrLQQ found at /usr/local/etc/test.sh:1 ... ...
查找脚本支持的tokens
AuthorizedKeysCommand 指定的脚本可接受的tokens %%, %f, %h, %k, %t, and %u
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
TOKENS Arguments tosome keywords can make use of tokens, which are expanded at runtime:
%% A literal ‘%’. %F The fingerprint of the CA key. %f The fingerprint of the keyor certificate. %h The home directory of the user. %i The key ID in the certificate. %K The base64-encoded CA key. %k The base64-encoded keyor certificate for authentication. %s The serial numberof the certificate. %T The type of the CA key. %t The keyor certificate type. %u The username.
AuthorizedKeysCommand accepts the tokens %%, %f, %h, %k, %t, and%u.