Skip to content

Environment not set on ssh connection #2

@plattrap

Description

@plattrap

VScode executes a cat ... | ssh -T <HOST_NAME> sh to connect to the remote machine.

On my machine sh is symlinked to /bin/dash, which when executed as a non-login shell will read no config files.

My solution is to:

  • add PermitUserEnvironment yes to /etc/ssh/sshd_config
  • create ~/.ssh/environment with the defines.
VSCODE_SERVER_CUSTOM_GLIBC_LINKER=/home/dev/.vscode-server/sysroot/lib/ld-linux-x86-64.so.2
VSCODE_SERVER_CUSTOM_GLIBC_PATH=/home/dev/.vscode-server/sysroot/usr/lib:/home/dev/.vscode-server/sysroot/lib
VSCODE_SERVER_PATCHELF_PATH=/home/dev/.vscode-server/sysroot/usr/bin/patchelf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions