When recently learning eBPF, I found that there seemed to be no good command-line virtual machine on Mac except for Multipass, so I chose Multipass as the development environment and connected using VSCode SSH. However, I discovered that I couldn't connect to the virtual machine at all. Initially, I modified the sshd_config and added the following code:
# Allow root login
PermitRootLogin yes
# Allow public key authentication
PubkeyAuthentication yes
# Allow password authentication
PasswordAuthentication yes
I found that the problem still persisted. According to online tutorials, I discovered that there was another configuration file at /etc/ssh/sshd_config.d/60-cloudimg-settings.conf
, so I modified that configuration file and restarted the SSH service to take effect.
Allow password login: PermitRootLogin yes
Restart the SSH service: sudo systemctl restart ssh