Skip to content

Remote-SSH - configure remote host via ssh instead of wget or direct web request #161

Closed

Description

@ytgui

Hi,
Remote develop is really an exciting feature for vscode, but there is still a little work to be improved I think, that is configure / download on remote by ssh connection. This is really needed for some server behind a firewall.

So, current steps are:

  1. Local (Windows) configure ssh pubkey authentication.
  2. Connect to remote (Linux).
  3. Wget binary from https://vscode.microsoft.com
  4. Install extensions from https://vscode.microsoft.com
  5. Remote-SSH connection finish, ready to work.

And these may be better:

  1. same
  2. same
  3. Copy binary from local to remote by ssh connection.
  4. Install extensions by ssh connection, through local (Win) networks
  5. same

// end

Thanks

Activity

  1. changed the title [-]Remote-SSH - configure remote host via ssh not wget or direct web request[/-] [+]Remote-SSH - configure remote host via ssh instead of wget or direct web request[/+] on May 6, 2019
  2. added
    feature-request
    ssh
    on May 6, 2019
  3. mklemarczyk commented on May 6, 2019

    @mklemarczyk

    This is very important issue. We can not work with this at all. All our servers are hosted in isolated network. Those servers does not have access to the Internet. The manual installation can be performed or deliver package from developer workstation.

    Can you add an option to manually disable this update process at least? We want to check new extension and help making it stable.

  4. ekerazha commented on May 7, 2019

    @ekerazha

    I tried to use Remote SSH on a local server. The server doesn't have Internet access for security reasons.

    A Remote SSH job tries to download VS Code Server through wget, but it fails because there's no Internet connection.

    PyCharm doesn't have this issue because the "server" part gets uploaded by the client and it's not downloaded from the Internet.

    Can you provide a procedure to upload the required VS Code Server through the VS Code client instead of relying on the server's Internet connection? Internet access for the server should not be mandatory.

    Thank you.

  5. thernstig commented on May 11, 2019

    @thernstig

    Isn't this a duplicate of #15, which was opened 4 days before this?

  6. eddy-geek commented on May 12, 2019

    @eddy-geek
  7. atomgalaxy commented on Jun 7, 2019

    @atomgalaxy

    I need this too.

  8. mbronni commented on Jun 7, 2019

    @mbronni

    Same for me, no internet connection on remote machine but on client one. There is also no root/sudoer user on remote.

  9. mightypenguin commented on Jun 13, 2019

    @mightypenguin

    Also struggling with this.
    It would probably be enough if there were documented steps for manually performing the installation on the server with a zip file.

  10. magic-lantern commented on Jun 14, 2019

    @magic-lantern

    I also would love to have this feature - some remote servers I work with have no outbound Internet access. It would be great if there were a configuration option to download all necessary files via my local Internet and push to remote server via SSH, then install there.

    Manual instructions would also work, but ideally the Remote-SSH tool would handle everything for the user.

  11. gturbo commented on Jun 18, 2019

    @gturbo

    Isn't it possible in the meantime to do a manual install of the needed components ?
    retrieve files from desktop machine, copy to remote server and deploy them in the expected location.

    Could you provide some hints in the faq.
    I can help for the faq article if someone gives me some hints in order to make it work

  12. Argonaute commented on Jun 19, 2019

    @Argonaute

    I know that Microsoft wants everyone to work in the cloud and if possible Azure, but it's not possible for many reasons.
    This request is legitimate for many developers, but seems poorly taken into account in products like VSCode or VisualStudio.
    It is currently a brake on the massive adoption of these products which, I admit, are very functional as long as we stay connected.

  13. avylove commented on Jun 19, 2019

    @avylove

    I create #738 requesting the extension utilize a system installed vscode server, which would be a much cleaner solution and more enterprise-friendly.

  14. 1 remaining item

  15. xgdgsc commented on Jul 18, 2019

    @xgdgsc

    From a user perspective, we don' t want to bother system administrators just for installing/updating an editor. I want everything installed inside my home.

  16. caffeineaddiction commented on Jul 18, 2019

    @caffeineaddiction

    imo there should be 2x client side config options.

    • wget as it is currently setup
    • ssh -R port is used to create dynamic socks proxy on host and reverse forwarded to server and server uses .js functionality to reproduce wget through the socks proxy

    as a work around I have done the following:

    Desktop ~/.ssh/config

    ...
    
    Host *
      RemoteForward 54321
    
    ...
    

    Remote: ~/bin/wget in which ~/bin is added to PATH via .bashrc

    #!/bin/bash
    export LD_LIBRARY_PATH=$HOME/opt/lib/tsocks/
    export TSOCKS_CONF_FILE=$HOME/opt/tsocks/tsocks.conf
    $HOME/bin/tsocks /usr/bin/wget $@
    

    Remote: ~/opt/tsocks/tsocks.conf

    server = 127.0.0.1
    server_port = 54321
    server_type = 5
    

    note tsocks binary has been scp-ed to ~/bin/tsocks and ~/opt/tsocks/ has been created with libtsocks.so which is normally stored in /usr/lib64/libtsocks.so

    This is a work around that allows me to have wget functionality with out messing with anything outside my profile to get it to work (eg: no root required ... even though I have it).

  17. educhana commented on Jul 22, 2019

    @educhana

    This is key. Many remote servers are firewalled.

  18. bro3cat commented on Jul 28, 2019

    @bro3cat

    And another difference to pycharm is , remote-ssh in pycharm could remote into a docker container ,but vscode could not.

  19. Chuxel commented on Jul 28, 2019

    @Chuxel
    Member

    And another difference to pycharm is , remote-ssh in pycharm could remote into a docker container ,but vscode could not.

    Yudong Wang (@bro3cat) This is off topic for this issue, but check out the Remote - Containers extension for that capability. See here for details on connecting to a remote docker host if that's what you are looking to do. Please open a separate issue if you're hitting problems so we can take a look. VS Code can connect to containers, the issue here is specifically that VS Code requires that the container or SSH host have access to the internet to do so.

  20. vinlyx commented on Jul 31, 2019

    @vinlyx

    Same for me, remote server does not have internet connection due to security reason.

  21. tbennett6421 commented on Aug 2, 2019

    @tbennett6421

    subscribed, this would make our lives so much easier developing services that run on remote hosts. Until then, we can't use this application

  22. nathanptackett commented on Aug 9, 2019

    @nathanptackett

    This is a needed feature for enterprise development!

  23. caffeineaddiction commented on Aug 9, 2019

    @caffeineaddiction

    subscribed, this would make our lives so much easier developing services that run on remote hosts. Until then, we can't use this application

    see my previous comment for temp work around

    #161 (comment)

  24. dlithio commented on Aug 12, 2019

    @dlithio

    If you can't get caffeineaddiction's fix working #161 comment, another workaround was posted on stackoverflow by aviso. It was easy for me to get the stackoverflow solution working, but I suspect it will be a bit more of a pain in the long run than the tsocks method here due to vscode/extension updates likely needing manual intervention if not disabled. I just couldn't get tsocks up and running, so it was nice to have a second option.

  25. Chuxel commented on Aug 30, 2019

    @Chuxel
    Member

    roblourens Wouldn't the setting added for #15 resolve this as well?

  26. roblourens commented on Aug 30, 2019

    @roblourens
    Member

    Yes, I think it's a duplicate.

    Please try installing the nightly version of the ssh extension, then setting "remote.SSH.allowLocalServerDownload": true. This should cause it to download the extension on your local machine then copy it over to the host via scp. Please file issues if you have any problems.

  27. nsgexo commented on Sep 9, 2019

    @nsgexo

    "remote.SSH.allowLocalServerDownload": true is working nicely !
    Thanks a lot!!

  28. locked and limited conversation to collaborators on Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestssh

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions