jeanp413 / open-remote-ssh

VSCode Remote Development: Open any folder on a remote machine using SSH.
MIT License
279 stars 38 forks source link

How to execute remote command? #134

Open Icemole opened 7 months ago

Icemole commented 7 months ago

Hi all!

The official Remote - SSH extension has an option that enables the RemoteCommand being respected (see original issue), is the functionality there for this extension already? If not, are there any plans to integrate this functionality? I'd be greatly interested in it.

jeanp413 commented 7 months ago

RemoteCommand is not supported currently but ProxyCommand is supported, doesn't it cover your use case?

Icemole commented 7 months ago

Sadly, it doesn't... I'm trying to run a singularity image on remote so that I get the native interpreter from there into VSCodium. However, substituting RemoteCommand singularity ... by ProxyCommand ssh <hostname> singularity ... runs into the following error:

[Error  - 15:03:34.747] Error resolving authority
Error: Connection lost before handshake
    at u (/home/user/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.45-universal/out/extension.js:1:370645)
    at /home/user/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.45-universal/out/extension.js:1:154361
    at Duplexify.<anonymous> (/home/user/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.45-universal/out/extension.js:1:155174)
    at Duplexify.emit (node:events:513:28)
    at Duplexify.emit (node:domain:489:12)
    at emitCloseNT (node:internal/streams/destroy:132:10)
    at emitErrorCloseNT (node:internal/streams/destroy:117:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Note: ProxyCommand singularity ... crashes with exactly the same error message, only way sooner.

ichigomiruku commented 7 months ago

In my setup I use ProxyCommand to so an ssh connection with a hop (using SSH key file with password) and can confirm I get a similar error:

[Error  - 09:08:47.486] Error resolving authority
Error: Premature close
    at new NodeError (node:internal/errors:399:5)
    at Socket.onclose (node:internal/streams/end-of-stream:154:30)
    at Socket.emit (node:events:513:28)
    at Socket.emit (node:domain:489:12)
    at Pipe.<anonymous> (node:net:322:12)
Icemole commented 6 months ago

Would it take too much work to implement the RemoteCommand functionality? If I can provide any more assistance I will be glad to do so.

madhavpcm commented 2 weeks ago

Same error for me.