Entries from 2021-01-17 to 1 day
authorized_keysのcommand=オプションにパイプを含むコマンドを指定できるか実験。 command="find /home/satob -maxdepth 1 -name '*.sh' | xargs grep '#!'" ssh-ed25519 AAAAC3Nz... pipe@example.com 実行してみたらこんな感じ。問題なく実行できた。結局…
satob.hatenablog.com で挙げた # cat authorized_keys command="ls /$SSH_ORIGINAL_COMMAND" ssh-rsa AAAAB.... $ ssh root@xxx.xxx.xxx.xxx -i ~/.ssh/com "tmp;hostname" ls: /tmp;hostname: No such file or directory みたいなケースで$SSH_ORIGINAL_CO…