Thank you very much for your explanations. I had the openhab.karafCommand configured, but without any reference to a public key. Please note that I work on an iMac with macOS Catalina 10.15.7. having slightly different shell commands as compared to Windows, but the command is adapted to match the expected syntax.
I managed to successfully install a key pair so that ssh login from my desktop shell to the openhab server on port 22 is working fine, without being prompted for a password:
However, if I modify this to access the Karaf Console, like:
# without explicitly defining the key
ssh openhab@<myOpenHabServerIP> -p 8101
# with specifying the key
ssh -i ~/.ssh/id_rsa openhab@<myOpenHabServerIP> -p 8101
…then, in both cases, I need to enter my password, although ~/.ssh/id_rsa on my local computer holds my key.
I can also login to the openhab server shell (i.e. not the Karaf Console) when I explicitly refer to the key:
ssh -i ~/.ssh/id_rsa openhab@<myOpenHabServerIP>
Therefore, I assumed that when entering exactly the aforementioned command into openhab.karafCommand, at least I should properly login at the openhab server when opening the terminal window in VS Code.
However, it appears that my VS Code does not consider this command at all. The only thing that happens when opening terminal is that the profile of my zsh is executed and I am prompted to enter a command. The openhab.karafCommand is not executed at all.