I'm accessing a remote host via a jumpbox. I can easily access the remote host if I access it via an ssh shell:
ssh remoteHost
Last login: Tue Feb 16 12:56:26 2016 from xx.xxx.xx.xx
remoteHost:user:~$ ls
<shows all the stuff>
but when I try to execute a command via the SSH command line option, I always get:
ssh remoteHost ls
"ls" isn't allowed to be executed.
Killed by signal 1.
I can successfully execute the ssh command on some hosts, but not others.
Is this a setting that can be configured on the server, i.e. "allow remote ssh commands" or something similar?
FWIW, I did have a look at How to enable using commands on remote host using ssh without password?, but I'm pretty sure my problem is not related to quoting as the only answer on that question seems to indicate.
Update:
On the remote host, I have an authorized_keys2 file that contains something like this:
ssh-rsa <encrypted stuff> jumpbox_user@jumpbox
ssh-rsa <encrypted stuff> jumpbox_user@mydesktop
My ssh/.config file looks like this:
Host remoteHost
HostName remoteHost
User user
ProxyCommand ssh -W %h:%p jumpbox_user@jumpbox_host
ServerAliveInterval 60
/home/user/.ssh/authorized_keys
file?sudosh
as your shell on the remotes. Talk to the admins there to expand the allowable set of commands.