Accessing my Windows VM for development
by Simon Marchi
on 27 November 2024
Here's how I access my Windows 10 VM when I need to test something in an MSYS2 or Cygwin environment.
-
Since my user is an administrator, I put my ssh public key in
C:\ProgramData\ssh\administrators_authorized_keys
(restart the service if necessary) -
At this point, ssh-ing to the machine should work, giving a PowerShell prompt.
-
Start an MSYS2 bash shell with:
PS C:\Users\Simon> $env:MSYSTEM = "MINGW64" PS C:\Users\Simon> c:\msys64\usr\bin\bash --login
Replace
MINGW64
with the desired environment name. -
Start a Cygwin shell with:
PS C:\Users\Simon> C:\cygwin64\bin\bash.exe --login