Vscode remote missing bash

I read about the ability to remotely dev on devices through vscode and tried to configure it but get an error, here is the log:

[21:55:48.829] Log Level: 2
[21:55:48.832] remote-ssh@0.51.0
[21:55:48.832] darwin x64
[21:55:48.835] SSH Resolver called for "ssh-remote+openwrt.local", attempt 1
[21:55:48.836] SSH Resolver called for host: openwrt.local
[21:55:48.836] Setting up SSH remote "openwrt.local"
[21:55:48.841] Acquiring local install lock: /var/folders/qq/7tsx54kn7ks6_ph0zftgj9pw0000gp/T/vscode-remote-ssh-openwrt.local-install.lock
[21:55:48.856] Looking for existing server data file at /Users/novski/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-openwrt.local-0ba0ca52957102ca3527cf479571617f0de6ed50-0.51.0/data.json
[21:55:48.858] Using commit id "0ba0ca52957102ca3527cf479571617f0de6ed50" and quality "stable" for server
[21:55:48.860] Install and start server if needed
[21:55:48.867] Checking ssh with "ssh -V"
[21:55:48.891] > OpenSSH_7.9p1, LibreSSL 2.7.3
[21:55:48.895] askpass server listening on /var/folders/qq/7tsx54kn7ks6_ph0zftgj9pw0000gp/T/vscode-ssh-askpass-634b88f6e401934c8a4c5de914a1db5ec9103bb5.sock
[21:55:48.895] Spawning local server with {"ipcHandlePath":"/var/folders/qq/7tsx54kn7ks6_ph0zftgj9pw0000gp/T/vscode-ssh-askpass-54d95147a3e68b439cdc922ab13380f0fa3923e8.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","57390","-o","ConnectTimeout=15","og-vorraum.local"],"dataFilePath":"/Users/novski/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-openwrt.local-0ba0ca52957102ca3527cf479571617f0de6ed50-0.51.0/data.json"}
[21:55:48.896] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/novski/.vscode/extensions/ms-vscode-remote.remote-ssh-0.51.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer)","VSCODE_SSH_ASKPASS_MAIN":"/Users/novski/.vscode/extensions/ms-vscode-remote.remote-ssh-0.51.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/qq/7tsx54kn7ks6_ph0zftgj9pw0000gp/T/vscode-ssh-askpass-634b88f6e401934c8a4c5de914a1db5ec9103bb5.sock"}
[21:55:48.900] Spawned 50050
[21:55:49.029] > local-server> Spawned ssh: 50051
[21:55:49.039] stderr> OpenSSH_7.9p1, LibreSSL 2.7.3
[21:56:05.171] stderr> debug1: Server host key: ssh-rsa SHA256:xxx
[21:56:05.312] stderr> Authenticated to openwrt.local ([fe80::9e65:f9ff:fe2a:44f%en0]:22).
[21:56:05.339] >   _______                     ________        __
>  |       |.-----.-----.-----.|  |  |  |.----.|  |_
>  |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
>  |_______||   __|_____|__|__||________||__|  |____|
>           |__| W I R E L E S S   F R E E D O M
>  -----------------------------------------------------
>  OpenWrt 19.07.2, r10947-65030d81f3
>  -----------------------------------------------------
[21:56:05.379] > ready: 624629af2323
[21:56:05.393] > Linux 4.14.171 #0 Thu Feb 27 21:05:12 2020
[21:56:05.394] Platform: linux
[21:56:05.417] stderr> -ash: bash: not found
[21:56:05.417] stderr> -ash: syntax error: unexpected "(" (expecting "then")
[21:56:05.419] stderr> Transferred: sent 15280, received 2368 bytes, in 0.1 seconds
[21:56:05.419] stderr> Bytes per second: sent 144259.8, received 22356.5
[21:56:05.421] Server delay-shutdown request failed: connect ECONNREFUSED /var/folders/qq/7tsx54kn7ks6_ph0zftgj9pw0000gp/T/vscode-ssh-askpass-54d95147a3e68b439cdc922ab13380f0fa3923e8.sock
[21:56:05.422] > local-server> ssh child died, shutting down
[21:56:05.425] Local server exit: 0
[21:56:05.425] Received install output: OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Server host key: ssh-rsa SHA256:xxx
Authenticated to openwrt.local ([fe80::9e65:f9ff:fe2a:44f%en0]:22).
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 19.07.2, r10947-65030d81f3
 -----------------------------------------------------
ready: 624629af2323
Linux 4.14.171 #0 Thu Feb 27 21:05:12 2020
-ash: bash: not found
-ash: syntax error: unexpected "(" (expecting "then")
Transferred: sent 15280, received 2368 bytes, in 0.1 seconds
Bytes per second: sent 144259.8, received 22356.5

[21:56:05.427] Resolver error: bash not found
[21:56:05.432] ------

Is there any hope to get that running? It seems to depend on bash and does not find it.

Found this in the forum but I tried the ms-vscode-remote.vscode-remote-extensionpack not the one he uses:

Any reason why you cannot just install it ("opkg update && opkg install bash")?

Yes, knowledge! Installed and run in to next error:

[22:21:16.728] >   _______                     ________        __
>  |       |.-----.-----.-----.|  |  |  |.----.|  |_
>  |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
>  |_______||   __|_____|__|__||________||__|  |____|
>           |__| W I R E L E S S   F R E E D O M
>  -----------------------------------------------------
>  OpenWrt 19.07.2, r10947-65030d81f3
>  -----------------------------------------------------
[22:21:16.755] > ready: 5072beccdf9c
[22:21:16.763] > Linux 4.14.171 #0 Thu Feb 27 21:05:12 2020
[22:21:16.763] Platform: linux
[22:21:17.244] stderr> bash: line 1: 
[22:21:17.245] stderr> host: command not found
[22:21:17.245] stderr> -ash: syntax error: unexpected "(" (expecting "then")
[22:21:17.245] > Unsupported architecture: mips
> 5072beccdf9c##27##
[22:21:17.245] Received install output: 5072beccdf9c##27##
[22:21:17.246] Unsupported architecture
[22:21:17.246] Terminating local server
[22:21:17.247] stderr> Transferred: sent 15280, received 2576 bytes, in 0.5 seconds
[22:21:17.247] stderr> Bytes per second: sent 28370.6, received 4782.9
[22:21:17.248] Resolver error: The remote host's architecture is not supported
[22:21:17.251] ------

Sadly.

"Unsupported architecture" seems pretty final to me... but know nothing about vscode.

Microsoft closes these issues with phrase "node does not support i386/..."

It looks like VSCode tries to push vscode-server the spyware module on your server.
So you will never get it work on ARM and MIPS devices here.

Indians are so Indian...

I've always used sftp with some sort of a GUI front-end, e.g sftpman + sftpman-gtk [1].

Imho,with a securely configured SSH acces, mounting a remote system to a local folder is simple and effective.


  1. https://wiki.archlinux.org/index.php/Sftpman

Your solution means testing happens on the development env. -> the local computer.
My intention for this question is, that I often use I/O like GPIO Pin's for external sensors or buttons.
I only have them connected to the remote device, so a remote development env. would be heaven.

Makes sense, thanks for explaining!

Just wanted to add that yeah seems like the vscode remote development doesn't work with openwrt for me either but I have been pretty seamlessly mounting the openwrt filesystem with sftp, as @SirToffski said, and specificially with https://marketplace.visualstudio.com/items?itemName=liximomo.remotefs on vscode it feels jsut like editing any other folder.

1 Like