I am looking for best way to call remote command over SSH. I create user 'rpcall', generate new certificate and fill authorized_keys. Secure it little bit more with
from="ip",no-agent-forwarding,no-X11-forwarding,no-port-forwarding,no-pty ssh-rsa ......
now user rpcall can't login to terminal
ssh -l rpc 192.168.12.1 PTY allocation request failed on channel 0
but it is possible to run any command
ssh -l rpc 192.168.12.1 cat /etc/passwd
Is there any solution i can limit command execution only to one processing script? For example /home/rpcall/bin/command.sh
I setuped bash shell for this user and using .bashrc force run processing script, but i don't know how to pass parameters from ssh call.
.bashrc for user rpcall
/home/rpcall/bin/command.sh $params1 $params2 exit
ssh call from other machine
ssh -l rpcall 192.168.12.1 "param1" "param2"