-
-
Save hydrz/18948cdc31bbd476bf4caf24ab672dbc to your computer and use it in GitHub Desktop.
vscode for multipass or ssh-remote and the command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env sh | |
# requirements | |
# psexec https://docs.microsoft.com/en-us/sysinternals/downloads/pstools | |
# openssh server https://github.com/PowerShell/Win32-OpenSSH | |
INSTANCE=primary | |
WINDOWS_USERNAME=administrator | |
WINDOWS_IP=$(route -n | grep "eth0" | grep 'UG[ \t]' | awk '{print $2}') | |
if [ "$@" ]; then | |
WORK=$(realpath $@) | |
fi | |
ssh "$WINDOWS_USERNAME@$WINDOWS_IP" "psexec \\\\127.0.0.1 -i -d \"C:\\Users\\nan\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" --remote=ssh-remote+$INSTANCE $WORK" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment