FlightAware Discussions

SSH Password Not Working

I have completed a fresh install of piaware. I am attempting to ssh into the pi through terminal in mac OS. I originally tried the default password of flightaware. This did not work. I was able to successfully change the pi password using a monitor and keyboard on the pi. Neither the default or new password will work when I try to ssh from the mac terminal. When I go back to the pi, I can successfully login using user:pi and password:(the new password I set up). I am using command sudo ssh pi@… from the mac terminal

sudo raspi-config
to enable ssh.
you can also put a blank ssh or ssh.txt file in /boot

Sorry forgot to mention I have already enabled SSH by adding the the ssh.txt file

you might find more details in the logs under /var/log/auth.log on your device.

What’S the output of the ssh login attempt? You could add ssh -v to your command line

1 Like

Sorry, try again. After 3 attempts I get “3 incorrect password attempts” I tried “sudo ssh -v” and got the same result. I am not familiar with how to access the logs

sudo cat /var/log/auth.log
or sudo tail /var/log/auth.log

Did you reboot after adding the ssh.txt file?

More info on enabling ssh can be found here

I have rebooted many times. I was able to execute sudo tail /var/log/auth.log and saw a few logins. I am able to login directly on the pi. I did enable ssh through command line directly on the pi just in case the ssh.txt file was not there. I am still not able to login using terminal. It still says sorry try again on the password. Is there a way I could somehow have a different password? I rebooted and am still able to login using the new password I created directly on the pi command line.

do a login attempt via SSH and then check the logs. Copy the part to here that we can have a look at it.

You don’t need sudo to use ssh. (i don’t expect it being the issue but it’s odd)

Your issue sounds strange and i’m not sure how to approach that.

1 Like

Two things to check:

  1. As wiedehopf says, you don’t need to sudo. If you do sudo, then sudo will prompt you for your password for the local account on your local machine (i.e. your Mac). That’s probably not the same as your Pi’s password.

  2. Failing that, check you have the right IP and are actually connecting to the Pi and not some other machine on your network

Given the comment about a “3 incorrect password attempts” message, I think it is case (1) since ssh doesn’t produce that message. Just get rid of the sudo and try again.

2 Likes

That’s exactly it… Here’s an example on my MBA.

feek@mba ~ % sudo ssh pi@192.168.1.189
Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
sudo: 3 incorrect password attempts
feek@mba ~ % 

That password prompt is asking for my Mac password, not the Pi password.

Without sudo, it’ll work.

2 Likes

Thanks all got it working. I used the password for my computer then it asked for the password of my pi. Simple fix. Thanks again.

You don’t need the root privileges on your computer to start ssh.
Just use ssh IP instead of sudo ssh IP … -.-

1 Like