Score:0

PATH not set after SSH from MacBook to Windows

pk flag

The goal is to start some jupyter notebooks remotely from my Macbook on my Windows machine, because of the GPU power.

I've installed the OpenSSH server utility on my Windows machine and I am able to connect to it from the Macbook. Unfortunately if I type in jupyter notebook in the remote PowerShell it can not resolve the command jupyter. I assume that it does not set the PATH variable. However the %PATH% variable is set correctly and if I change the directory to %ANACONDA_HOME% it changes to the desired location.

But I don't know why it cannot find the jupyter command.

edit: The workaround to this issue is to go manually to the scripts folder of anaconda and start activate base, which is usually done by about_Profiles. BTW: If I connect via ssh, variables such as $PROFILE or $PSHOME are not set.

Score:1
im flag

You need to configure your default shell in OpenSSH server. By default you get a cmd window, not a PowerShell one. To set it to PowerShell, you can run the following command from and elevated PowerShell window on the Windows server:

New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force

All the default $env: variables should load the next time you connect over SSH.

For more information, see the Microsoft documentation here.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.