Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • post output of ssh -vvv user@device_host uptime to have at least a bit idea what is going on behind the scenes and what is the other side running. Later on you can try to workaround it with ssh -tt user@device_host uptime (behave like interactive script), if it would help. Commented Dec 12, 2015 at 18:55
  • Embedded devices often do not run openssh, often dropbear is used. Anyway, does it have a forced command in the daemon? Commented Dec 12, 2015 at 19:15
  • @Jakuje: With -vvv, I indeed get a lot of output. Some info: remote system is OpenSSH5.9. I have added the -vv output to the question above - but I can't understand most of it.. -tt gave me an interactive shell on the remote machine as if I hadn't passed a command at all - no indication that the command executed, I'm afraid.. Commented Dec 13, 2015 at 12:32
  • 1
    I think Rui was probably close to the correct answer. If it uses openssh and behaves this way, it looks like there is ForceCommand option used in sshd_config. Can you verify it? If you would be able to change it or remove it you are done. If not, you would probably have to code some expect script to interact with the shell (you can find many similar questions about this topic). Commented Dec 13, 2015 at 17:05
  • I don't have file system access on the device, so I'm not able to edit sshd_config - a pity! Your idea to use expect sounds like the next best option - thanks! Commented Dec 14, 2015 at 12:08