macOS ssh can't connect to a Linux VM

I have a Linux VM (Fedora 39 Xfce Spin) created by Parallels Desktop on my Mac, I want to connect to this VM using ssh. But when I tried ssh in Terminal.app, ssh requires my VM's password again and again, even though I've entered the correct password of my VM:


% ssh vmuser@<vm-addr>
(vmuser@<vm-addr>) Password:
(vmuser@<vm-addr>) Password:
......


More Details:

  1. On my Mac: System Preferences > Sharing > Remote Login is on.
  2. On my Linux VM: `PasswordAuthentication yes` in `/etc/ssh/sshd_config`.

MacBook Air 13″, macOS 14.1

Posted on Dec 11, 2023 5:01 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 11, 2023 11:43 PM

Does the password include any accented or special characters? One possibility is that the keyboard layout of the Linux VM is not exactly identical to the one in macOS.


I'd try making a test user with a simple password like "abc" and see if that logs in.


FWIW, you are doing ssh from your mac to the VM, so having Remote Login on or off is immaterial.

Similar questions

2 replies
Question marked as Top-ranking reply

Dec 11, 2023 11:43 PM in response to tn0000a

Does the password include any accented or special characters? One possibility is that the keyboard layout of the Linux VM is not exactly identical to the one in macOS.


I'd try making a test user with a simple password like "abc" and see if that logs in.


FWIW, you are doing ssh from your mac to the VM, so having Remote Login on or off is immaterial.

Dec 12, 2023 3:04 PM in response to tn0000a

Try 2 tests.


1 is an ssh to a known good system

1 is to your VM


ssh -v -v -v user@good.system.address

ssh -v -v -v vmuser@<vm-addr>


Now compare the verbose output from each. They should be similar right up until the VM rejects your password and prompts again. What is different between the verbose VM output and the known good ssh output. There should be a clue about why your password is being rejected.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

macOS ssh can't connect to a Linux VM

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.