I configure a ssh command key like (in a remote mashine M1):
command="/usr/bin/nslookup",no-port-forwarding,no-X11-forwarding,no-agent-forwarding ssh-dss DEADBEEFDEADBEEF= mycow@farm.org
To allow to run nslookup in M1 from a client machine C1. It works and i can run:
C1> ssh -i mylookup_key M1
And i get the nslookup execution on M1, but i need to pass parameters to get real work. How can i pass parameters to ssh command key?
p.d: I’m using nslookup as an example of the real program that I want to exec.
Take a look at the
$SSH_ORIGINAL_COMMANDvariable which should contain the command passed tossh. For example:Then try: