vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Remote SSH - add support for SSH to iOS devices

Open bensh opened this issue 4 years ago • 6 comments

  • VSCode Version: 1.53.2
  • Local OS Version: macOS 10.14.6
  • Remote OS Version: iOS 12.4.9
  • Remote Extension/Connection Type: SSH/Docker/WSL SSH

Steps to Reproduce:

  1. Use SSH-Remote to SSH to iphone device
[11:54:32.323] [email protected]
[11:54:32.323] darwin x64
[11:54:32.324] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a226950686f6e65426c75655f3139322e3136382e312e3638227d", attempt 1
[11:54:32.325] "remote.SSH.useLocalServer": true
[11:54:32.325] "remote.SSH.sshPath": undefined
[11:54:32.325] "remote.SSH.sshConfigurationFile": undefined
[11:54:32.325] "remote.SSH.useFlock": true
[11:54:32.325] "remote.SSH.lockfilesInTmp": false
[11:54:32.326] "remote.SSH.localServerDownload": auto
[11:54:32.326] "remote.SSH.remoteServerListenOnSocket": false
[11:54:32.326] "remote.SSH.showLoginTerminal": false
[11:54:32.326] "remote.SSH.defaultExtensions": []
[11:54:32.326] SSH Resolver called for host: iPhoneBlue
[11:54:32.326] Setting up SSH remote "iPhoneBlue"
[11:54:32.329] Acquiring local install lock: /var/folders/w8/bgzlm3zd5_b7jk2mzv6500zc0000gn/T/vscode-remote-ssh-iPhoneBlue-install.lock
[11:54:32.339] Looking for existing server data file at /Users/ben/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-iPhoneBlue-622cb03f7e070a9670c94bae1a45d78d7181fbd4-0.64.0/data.json
[11:54:32.340] Using commit id "622cb03f7e070a9670c94bae1a45d78d7181fbd4" and quality "stable" for server
[11:54:32.344] Install and start server if needed
[11:54:32.348] Checking ssh with "ssh -V"
[11:54:32.381] > OpenSSH_7.9p1, LibreSSL 2.7.3

[11:54:32.383] askpass server listening on /var/folders/w8/bgzlm3zd5_b7jk2mzv6500zc0000gn/T/vscode-ssh-askpass-aaf0ec26dfaa8122a4c003aecf24643265e70fa7.sock
[11:54:32.384] Spawning local server with {"ipcHandlePath":"/var/folders/w8/bgzlm3zd5_b7jk2mzv6500zc0000gn/T/vscode-ssh-askpass-24c289d0f2308e43e467ee8a8d629c453225989f.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","59568","-o","ConnectTimeout=15","iPhoneBlue"],"dataFilePath":"/Users/ben/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-iPhoneBlue-622cb03f7e070a9670c94bae1a45d78d7181fbd4-0.64.0/data.json"}
[11:54:32.384] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/ben/.vscode/extensions/ms-vscode-remote.remote-ssh-0.64.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/ben/.vscode/extensions/ms-vscode-remote.remote-ssh-0.64.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/w8/bgzlm3zd5_b7jk2mzv6500zc0000gn/T/vscode-ssh-askpass-aaf0ec26dfaa8122a4c003aecf24643265e70fa7.sock"}
[11:54:32.387] Spawned 97385
[11:54:32.492] > local-server> Spawned ssh: 97386
[11:54:32.500] stderr> OpenSSH_7.9p1, LibreSSL 2.7.3
[11:54:32.936] stderr> debug1: Server host key: ssh-rsa SHA256:zQ/eEostXE44MzrDhUHN8f/ekE/1DZ4vR5S+BU8oO2s
[11:54:33.090] Got askpass request: {"request":"[email protected]'s password:"}
[11:54:33.091] Showing password prompt
[11:54:33.092] Listening for interwindow password on /var/folders/w8/bgzlm3zd5_b7jk2mzv6500zc0000gn/T/vscode-ssh-askpass-23563291e774870f903f9e1335191e035d0602fa.sock
[11:54:33.092] Writing password prompt to globalState
[11:54:36.201] Got password response
[11:54:36.201] Interactor gave response: *********
[11:54:36.202] Cleaning up other-window auth server
[11:54:36.273] stderr> Authenticated to 192.168.1.68 ([192.168.1.68]:22).
[11:54:36.378] > ready: f96cf9703f49
[11:54:36.458] > Darwin 18.7.0 Darwin Kernel Version 18.7.0: Thu Oct 29 23:39:18 PDT 2020; root:xnu-4903.272.3~1/RELEASE_ARM64_T7000
[11:54:36.459] Platform: macOS
[11:54:36.642] > f96cf9703f49: running
[11:54:37.440] > Unsupported architecture: iPhone7,2
> f96cf9703f49: start
> exitCode==27==
> listeningOn====
[11:54:37.441] > osReleaseId==Darwin==
> arch==iPhone7,2==
> tmpDir==/tmp==
> platform==macOS==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> extInstallTime====
> serverStartTime====
> f96cf9703f49: end
[11:54:37.442] Received install output: 
exitCode==27==
listeningOn====osReleaseId==Darwin==
arch==iPhone7,2==
tmpDir==/tmp==
platform==macOS==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime====

[11:54:37.443] Unsupported architecture
[11:54:37.443] Terminating local server
[11:54:37.451] Resolver error: Error: The remote host's architecture is not supported
	at Function.ServerInstallError (/Users/ben/.vscode/extensions/ms-vscode-remote.remote-ssh-0.64.0/out/extension.js:1:64057)
	at c (/Users/ben/.vscode/extensions/ms-vscode-remote.remote-ssh-0.64.0/out/extension.js:1:58042)
	at Object.t.handleInstallOutput (/Users/ben/.vscode/extensions/ms-vscode-remote.remote-ssh-0.64.0/out/extension.js:1:62898)
	at Object.t.tryInstallWithLocalServer (/Users/ben/.vscode/extensions/ms-vscode-remote.remote-ssh-0.64.0/out/extension.js:1:405581)
	at processTicksAndRejections (internal/process/task_queues.js:97:5)
	at async /Users/ben/.vscode/extensions/ms-vscode-remote.remote-ssh-0.64.0/out/extension.js:1:310867
	at async Object.t.withShowDetailsEvent (/Users/ben/.vscode/extensions/ms-vscode-remote.remote-ssh-0.64.0/out/extension.js:1:406337)
	at async /Users/ben/.vscode/extensions/ms-vscode-remote.remote-ssh-0.64.0/out/extension.js:1:404105
	at async S (/Users/ben/.vscode/extensions/ms-vscode-remote.remote-ssh-0.64.0/out/extension.js:1:400873)
	at async Object.t.resolveWithLocalServer (/Users/ben/.vscode/extensions/ms-vscode-remote.remote-ssh-0.64.0/out/extension.js:1:403732)
	at async Object.t.resolve (/Users/ben/.vscode/extensions/ms-vscode-remote.remote-ssh-0.64.0/out/extension.js:1:314879)
	at async /Users/ben/.vscode/extensions/ms-vscode-remote.remote-ssh-0.64.0/out/extension.js:127:110431
[11:54:37.452] Local server exit: 15
[11:54:37.456] ------

bensh avatar Feb 24 '21 12:02 bensh

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 10 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscode-triage-bot avatar Feb 25 '21 07:02 vscode-triage-bot

:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscode-triage-bot avatar Mar 02 '21 02:03 vscode-triage-bot

Hey @bamurtaugh, is there anything I can do to help get the ball rolling on this? This would be a game changer for me

NSExceptional avatar Feb 26 '22 01:02 NSExceptional

Thanks for the interest @NSExceptional!

Deeper technical changes would need to be explored and implemented in order to support this (i.e. allowing the server to run on iOS). For folks who may review this issue, there is a list of connection and Linux requirements here: https://code.visualstudio.com/docs/remote/linux.

bamurtaugh avatar Feb 28 '22 20:02 bamurtaugh

I don't actually know if it's possible for an iPhone app to expose an SSH host, but jailbroken devices can be SSH'd into, no problem. And on a jailbroken device there is nothing stopping the server from running.

According to that page it should be no problem; you can install curl and wget on jailbroken iOS. The only limitation may be artificial at this point, unless the server code needs to be specifically compiled and linked against the iOS SDK

Where do I go from here? I have a jailbroken device on iOS 14 ready to test anything

NSExceptional avatar Feb 28 '22 20:02 NSExceptional

Even implementing the ability to SSH into a jailbroken device would be a huge step forward here (that's what I use it for as well), while people smarter than I work out if it can be rolled out fully. IMO of iOS devices, SSH is a jailbreak thing only, which is enabled when the device has been modified. I doubt there would be any way to enable SSH on a stock phone unless Apple implement it - still, this would be huge.

bensh avatar Mar 01 '22 08:03 bensh

same issue:


[01:24:22.518] > listeningOn====
> osReleaseId==Darwin==
> arch==iPhone10,6==
> vscodeArch====
> bitness==64==
> tmpDir==/tmp==
> platform==macOS==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime====
> execServerToken==1aa1a111-1111-1a11-a111-1a1a11111111==
> 25c5fdc2d5a5: end
[01:24:22.519] Received install output: 
exitCode==27==listeningOn====
osReleaseId==Darwin==
arch==iPhone10,6==
vscodeArch====
bitness==64==
tmpDir==/tmp==
platform==macOS==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime====
execServerToken==1aa1a111-1111-1a11-a111-1a1a11111111==

[01:24:22.522] Unsupported architecture

0rShemesh avatar Feb 22 '24 23:02 0rShemesh

same here

ItzMatty3241 avatar Aug 17 '24 08:08 ItzMatty3241