4 ms·
With the following test.sh: #!/bin/bash case "$SSH_ORIGINAL_COMMAND" in *) sudo $SSH_ORIGINAL_COMMAND ;; esac and the ssh-base
by mmsc 3y ago
With the following test.sh:
#!/bin/bash
case "$SSH_ORIGINAL_COMMAND" in
*)
sudo $SSH_ORIGINAL_COMMAND
;;
esac
and the ssh-based restriction:
command="/tmp/test.sh"
$ ssh user@server 'uname > /tmp/123'
uname: extra operand ‘>’
Try 'uname --help' for more information.
$ ssh user@server 'uname $(ls)'
uname: extra operand ‘$(ls)’
Try 'uname --help' for more information.