1

I am using SSH (smarTTY port 22) to access a Netgear R8000 with DD-WRT installed but I keep getting the same error when trying to run any commands.

The error is: sh: bash: not found

screenshot

Also, how does one list file directory for config. I have tried using /etc..

  • Does echo hello work? – Franklin Yu Jan 9 '18 at 5:12
  • No it does not work.Welcome to Smart Terminal. root@192.168.10.1:~# echo hello sh: bash: not found root@192.168.10.1:~# – Kwang Lim Jan 9 '18 at 5:15
  • Find something like "shell" in settings? Something like this. – Franklin Yu Jan 9 '18 at 5:21
  • My settings are exactly the same as the one you provided in the link i.e. default shell for background commands = bash – Kwang Lim Jan 9 '18 at 5:45
  • 1
    @MechtEngineer I don’t think OP changed the login shell. From online tutorials about SmarTTY, I guess SmarTTY forces use of certain shell, ignoring the login shell in remote machine. Changing configuration of SmarTTY seems to solve the issue. – Franklin Yu Jan 10 '18 at 3:18
3

Changing the default shell in SmarTTY from bash to sh seems to solve the problem. This is possibly a bad design of SmarTTY: it should by default respect to remote user setting, instead of calling bash regardless. Some platform, a router in OP’s case, doesn’t have enough space to provide a Bash. On those platforms, user's log-in shell is sh, and when the user SSH into it, a decent SSH client (such as OpenSSH) would ask the daemon to start a log-in shell.

Note: this behavior is SSH specific. It doesn’t matter you’re on Windows or Linux.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.