4

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
  • The hosts behind the jumpbox all run Red Hat, if that makes a difference. – firtydank Feb 16 '16 at 13:16
  • On the remoteHost, can you show us the content of the /home/user/.ssh/authorized_keys file? – EightBitTony Feb 16 '16 at 13:24
  • @EightBitTony - added in the question, thanks. – firtydank Feb 16 '16 at 13:36
  • 1
    What kind of ssh daemon has that jumpfox? Dropbear does not execute ssh arguments... – Rui F Ribeiro Feb 16 '16 at 13:48
  • 3
    Judging from that error message, you're probably running sudosh as your shell on the remotes. Talk to the admins there to expand the allowable set of commands. – Mark Plotnick Feb 16 '16 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.