Cannot SSH from macOS. But Windows/phone works fine?

As above.

When using phone or windows based PC, I can SSH straight into the DietPi - however when I use my Mac, it says the password is incorrect. Looked around at other entries but none has really answered this specific question. Any help is appreciated.

probably an issue with the SSH client on your Mac. If possible try another one. At least using mobile phone or Windows is proven your SSH server working :wink:

Maybe some special character mapped on a different key on mac keyboard?


From macOS you log in as root? if so, maybe try to connect in user…

I have 2 macbooks both don’t work. So I don’t think it’s specific to just 1.

I am logging in via the IP address - how do you mean I should?

It is just an all lowercase password so couldn’t be special characters

If you just use ssh <IP> you login as root. If you want to login as the user dietpi you need to use ssh dietpi@<IP>.
So maybe with windows you log in as another user than with mac?

1 Like

Okay, this led me to be able to fix the issue - thank you.

I input this and it came up with:

ssh dietpi@<IP>
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed.
The fingerprint for the ED25519 key sent by the remote host is SHA256:u0QRoi6GDNVWwzJuDPkAMMOiBHGxYCxSmcbQFw.
Please contact your system administrator. Add correct host key in /Users/arden/.ssh/known_hosts to get rid of this message.

Offending ED25519 key in /Users/arden/.ssh/known_hosts:1 
Host key for <IP>  has changed and you have requested strict checking.
Host key verification failed.

I then went into the text file and updated the fingerprint, in /Users/arden/.ssh/known_hosts

Use ‘Command + Shift + .’ to show hidden folders in finder.

Then when inputting the above ssh dietpi@<IP>

It prompts with:

arden-MacBook-Air:~ arden$ ssh dietpi@<IP>
The authenticity of host '<IP> (<IP>)' can't be established.
ED25519 key fingerprint is SHA256:u0QRoi6GDNVWwzJuDPkAMMOiBHGxYCxSmcbQFw.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? 

Input: yes

Warning: Permanently added '<IP>' (ED25519) to the list of known hosts.

dietpi@<IP> password: 

Input your dietpi password and it will log in.
Unsure why these issues occur on mac, however on my newer M1 MacBook the below worked fine without the hassle, hope this helps someone in the future.

ssh dietpi@<IP>

This happened because you connected by ssh from this computer to the same address in the past. Upon trying to connect to the new system, ssh client detected the different server under the same identity and warned you about it. In most of the cases that the system was changed or upgraded, it is safe to ignore this error, delete the offending line in known_hosts, and reconnect accepting the key.
In your other systems you had not connected to this address before, that’s why it was working fine.

Honestly, I hadn’t connected to it before which is why I was so confused. Alas, thanks for everyone’s help.

It doesn’t have to be the same device, but the same IP or hostname.

1 Like