Skip to content

SSH to Termux not working. #3769

@Vinchethescript

Description

@Vinchethescript
  • VSCode Version: Latest, installed from Arch's official repositories.
  • Local OS Version: Arch Linux x86_x64, kernel 5.8.3arch1-1.
  • Remote OS Version: Android 8.0 Termux.
  • Remote Extension/Connection Type: SSH.

Steps to Reproduce:

  1. Install Termux from Play Store.
  2. Install openssh package from pkg and run sshd.
  3. Try to connect via VSCode to your phone's IP.

Does this issue occur when you try this locally?: No.
Does this issue occur when you try this locally and all extensions are disabled?: No.

When this happens, I get this window:
Error window

Output:
(Full log file here)

[19:46:59.741] Log Level: 2
[19:46:59.758] remote-ssh-nightly@2020.9.41220
[19:46:59.771] linux x64
[19:46:59.837] SSH Resolver called for "ssh-remote+termux", attempt 1
[19:46:59.838] SSH Resolver called for host: termux
[19:46:59.838] Setting up SSH remote "termux"
[19:46:59.889] Acquiring local install lock: /tmp/vscode-remote-ssh-termux-install.lock
[19:47:00.430] Looking for existing server data file at /home/vincysuper07/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh-nightly/vscode-ssh-host-termux-cd9ea6488829f560dc949a8b2fb789f3cdc05f5d-2020.9.41220/data.json
[19:47:00.433] Using commit id "cd9ea6488829f560dc949a8b2fb789f3cdc05f5d" and quality "stable" for server
[19:47:00.437] Install and start server if needed
[19:47:00.452] Checking ssh with "ssh -V"
[19:47:00.488] > OpenSSH_8.3p1, OpenSSL 1.1.1g  21 Apr 2020

[19:47:00.502] askpass server listening on /run/user/1000/vscode-ssh-askpass-ef4cd26a86b55293d6021b5ac4c58c181222b7cb.sock
[19:47:00.503] Spawning local server with {"ipcHandlePath":"/run/user/1000/vscode-ssh-askpass-e93d62bae4a73b520b3556c2e91d400250d65bc7.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","36421","-o","ConnectTimeout=15","termux"],"dataFilePath":"/home/vincysuper07/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh-nightly/vscode-ssh-host-termux-cd9ea6488829f560dc949a8b2fb789f3cdc05f5d-2020.9.41220/data.json"}
[19:47:00.503] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/home/vincysuper07/.vscode/extensions/ms-vscode-remote.remote-ssh-nightly-2020.9.41220/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/usr/share/code/code","VSCODE_SSH_ASKPASS_MAIN":"/home/vincysuper07/.vscode/extensions/ms-vscode-remote.remote-ssh-nightly-2020.9.41220/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/run/user/1000/vscode-ssh-askpass-ef4cd26a86b55293d6021b5ac4c58c181222b7cb.sock"}
[19:47:00.644] Spawned 14777
[19:47:00.983] > local-server> Spawned ssh: 14785
[19:47:00.995] stderr> OpenSSH_8.3p1, OpenSSL 1.1.1g  21 Apr 2020
[19:47:01.636] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:PBpxaq+39w5AHXZimu8QdknNMJeeoVq5IY3Aan5R+6A
[19:47:02.482] Got askpass request: {"request":"vincysuper07@termux's password:"}
[19:47:02.498] Showing password prompt
[19:47:02.501] Listening for interwindow password on /run/user/1000/vscode-ssh-askpass-b28a01b73a8e24decbab14dd6e2f09fcf4bf36c2.sock
[19:47:02.501] Writing password prompt to globalState
[19:47:08.510] Got password response
[19:47:08.518] Interactor gave response: *******
[19:47:08.520] Cleaning up other-window auth server
[19:47:09.228] stderr> Authenticated to termux ([192.168.1.8]:2222).
[19:47:09.298] > e (Yes, this is my MOTD.)
[19:47:09.397] > ready: 595058a859a3
[19:47:09.430] > Linux 3.18.91-14843133-QB29764553 #1 SMP PREEMPT Tue Mar 10 14:31:46 KST 2020
[19:47:09.433] Platform: linux
[19:47:09.547] > 595058a859a3: running
[19:47:09.707] > Warning: Can't find libstdc++.so or ldconfig, can't verify libstdc++ version
[19:47:09.746] > Missing GLIBC >= 2.17!
> Found version 
> 595058a859a3$$1$$
[19:47:09.761] > Acquiring lock on /data/data/com.termux/files/home/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/vscode-remote-lock.u0_a208.cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
[19:47:09.805] > Found existing installation at /data/data/com.termux/files/home/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d...
[19:47:09.811] > Checking /data/data/com.termux/files/home/.vscode-server/.cd9ea6488829f560dc949a8b2fb789f3cdc05f5d.log and /data/data/com.termux/files/home/.vscode-server/.cd9ea6488829f560dc949a8b2fb789f3cdc05f5d.pid for a running server
[19:47:09.828] > Looking for server with pid: 22479
[19:47:09.911] > Starting server with command... /data/data/com.termux/files/home/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/server.sh --host=127.0.0.1 --enable-remote-auto-shutdown  --port=0 &> "/data/data/com.termux/files/home/.vscode-server/.cd9ea6488829f560dc949a8b2fb789f3cdc05f5d.log" < /dev/null
> printenv:
[19:47:09.935] >     SHELL=/data/data/com.termux/files/usr/bin/zsh
>     PREFIX=/data/data/com.termux/files/usr
>     PWD=/data/data/com.termux/files/home
>     LOGNAME=u0_a208
>     EXTERNAL_STORAGE=/sdcard
>     LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
>     HOME=/data/data/com.termux/files/home
>     LANG=en_US.UTF-8
>     TMPDIR=/data/data/com.termux/files/usr/tmp
>     VSCODE_AGENT_FOLDER=/data/data/com.termux/files/home/.vscode-server
>     SSH_CONNECTION=192.168.1.9 49048 192.168.1.8 2222
>     ANDROID_DATA=/data
>     USER=u0_a208
>     SHLVL=1
>     ANDROID_ROOT=/system
>     BOOTCLASSPATH=/system/framework/core-oj.jar:/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/legacy-test.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/apache-xml.jar:/system/framework/org.apache.http.legacy.boot.jar:/system/framework/smartbondingservice.jar:/system/framework/sprengine.jar:/system/framework/android.hidl.base-V1.0-java.jar:/system/framework/android.hidl.manager-V1.0-java.jar:/system/framework/timakeystore.jar:/system/framework/fipstimakeystore.jar:/system/framework/ucmopensslenginehelper.jar:/system/framework/esecomm.jar:/system/framework/SemAudioThumbnail.jar:/system/framework/knoxsdk.jar:/system/framework/sec_edm.jar:/system/framework/sagearpolicymanager.jar:/system/framework/sec_sdp_sdk.jar:/system/framework/sec_sdp_hidden_sdk.jar:/system/framework/knoxvpnuidtag.jar
>     SSH_CLIENT=192.168.1.9 49048 2222
>     PATH=/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets
>     OLDPWD=/data/data/com.termux/files/home
>     _=/data/data/com.termux/files/usr/bin/printenv
[19:47:09.939] > Spawned remote server: 23819
[19:47:09.980] > Waiting for server log...
[19:47:10.543] > Waiting for server log...
[19:47:11.101] > Waiting for server log...
[19:47:11.654] > Waiting for server log...
[19:47:12.220] > Waiting for server log...
[19:47:12.777] > Waiting for server log...
[19:47:13.337] > Waiting for server log...
[19:47:13.910] > Waiting for server log...
[19:47:14.470] > Waiting for server log...
[19:47:15.023] > Waiting for server log...
[19:47:15.612] > Waiting for server log...
[19:47:16.205] > Waiting for server log...
[19:47:16.841] > Waiting for server log...
[19:47:17.356] > Waiting for server log...
[19:47:17.881] >  
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
> *
>  
[19:47:17.948] > Server did not start successfully. Full server log at /data/data/com.termux/files/home/.vscode-server/.cd9ea6488829f560dc949a8b2fb789f3cdc05f5d.log >>>
[19:47:17.964] > /data/data/com.termux/files/home/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/server.sh: 12: /data/data/com.termux/files/home/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/node: not found
[19:47:17.967] > <<< End of server log
> 595058a859a3: start
> exitCode==32==
> sshAuthSock====
> listeningOn====
> osReleaseId==Linux==
> arch==aarch64==
> webUiAccessToken====
> tmpDir==/tmp==
> platform==linux==
> 595058a859a3: end
[19:47:17.969] Received install output: 
exitCode==32==
sshAuthSock====
listeningOn====
osReleaseId==Linux==
arch==aarch64==
webUiAccessToken====
tmpDir==/tmp==
platform==linux==

[19:47:17.986] Terminating local server
[19:47:18.061] Resolver error: Error: The VS Code Server failed to start
	at Function.ServerInstallError (/home/vincysuper07/.vscode/extensions/ms-vscode-remote.remote-ssh-nightly-2020.9.41220/out/extension.js:1:94355)
	at /home/vincysuper07/.vscode/extensions/ms-vscode-remote.remote-ssh-nightly-2020.9.41220/out/extension.js:1:92571
	at Object.t.handleInstallOutput (/home/vincysuper07/.vscode/extensions/ms-vscode-remote.remote-ssh-nightly-2020.9.41220/out/extension.js:1:93073)
	at Object.t.tryInstallWithLocalServer (/home/vincysuper07/.vscode/extensions/ms-vscode-remote.remote-ssh-nightly-2020.9.41220/out/extension.js:127:102430)
	at processTicksAndRejections (internal/process/task_queues.js:85:5)
	at async /home/vincysuper07/.vscode/extensions/ms-vscode-remote.remote-ssh-nightly-2020.9.41220/out/extension.js:127:104510
	at async Object.t.withShowDetailsEvent (/home/vincysuper07/.vscode/extensions/ms-vscode-remote.remote-ssh-nightly-2020.9.41220/out/extension.js:127:110096)
	at async /home/vincysuper07/.vscode/extensions/ms-vscode-remote.remote-ssh-nightly-2020.9.41220/out/extension.js:127:101003
	at async R (/home/vincysuper07/.vscode/extensions/ms-vscode-remote.remote-ssh-nightly-2020.9.41220/out/extension.js:127:97793)
	at async Object.t.resolveWithLocalServer (/home/vincysuper07/.vscode/extensions/ms-vscode-remote.remote-ssh-nightly-2020.9.41220/out/extension.js:127:100652)
	at async Object.t.resolve (/home/vincysuper07/.vscode/extensions/ms-vscode-remote.remote-ssh-nightly-2020.9.41220/out/extension.js:127:108038)
	at async /home/vincysuper07/.vscode/extensions/ms-vscode-remote.remote-ssh-nightly-2020.9.41220/out/extension.js:127:143767

Metadata

Metadata

Assignees

No one assigned

    Labels

    sshIssue in vscode-remote SSH

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions