
인증 키가 테스트 매개변수가 있는 명령으로 제한된다고 가정하면 command="bin/testparameters"
ssh 호출은 다음과 같습니다.
ssh user@host 'some parameters which may include other commands'
bin/testparameters
이 값을 읽는 방법 'some parameters which may include other commands'
.
답변1
전달된 추가 매개변수는 ssh
환경 변수에 표시됩니다 SSH_ORIGINAL_COMMAND
.
$ tail -1 .ssh/authorized_keys
command="printf '%s\n' \"$SSH_ORIGINAL_COMMAND\"" ssh-rsa AAAA....kz6C5 [email protected]
$ ssh [email protected] foo bar farkle
foo bar farkle