0

I m trying to ssh my rpi from ubuntu terminal and I get permission denied(publickey,password).

The password is correct and I still get this error.

Even so, when I try connecting from putty on windows, it works fine.

Antoher weird thing, I ve set up a static ip address for the pi to connect from putty, but on Ubuntu it only works with the default ip address, not the static IP.

Thx

7
  • Are you sure you use the right user name (default pi) when using ssh?
    – Jos
    Feb 20, 2018 at 11:23
  • Yes, the default username. Feb 20, 2018 at 11:35
  • I even tried with ssh root@ip. Still same problem. Feb 20, 2018 at 11:35
  • 2
    Try ssh -v -v pi@host to get some more debugging info.
    – Jos
    Feb 20, 2018 at 11:37
  • Connection is established on port 22, then key_load_public no such file, then public key, host is known, then auth method password. I enter the password, access denied.. Feb 20, 2018 at 11:49

1 Answer 1

1

Maybe someone encounters this issue again near time soon, so I will post my solution.

After many tries and many blogs/tutorials/documentation I ve read, nothing seemed to work. So I just unplugged the ethernet cable, put the rpi on a screen and did the following

  1. $sudo apt-get install openssh-server openssh-client
  2. $ifconfig after the $ifconfig command you will get a list with eth0, lo, wlan0 I noted the ip address from the wlan0 part
  3. ssh user@wlan0ipaddress
  4. amazing, ssh over Wi-Fi, no cables, life is good.

Thanks everyone for their support so far. Wish you an amazing life.

3
  • But how do you explain that you could ssh from Windows?
    – Jos
    Feb 20, 2018 at 22:02
  • 1
    before reinstall next time you might want to read the logfile first (should be /var/log/auth.log), ssh shows pretty detailled why a login fails
    – Fabian
    Feb 20, 2018 at 23:11
  • @Jos I wish I could. On the windows I took laptop s ip from ipconfig and then set a static ip on the raspberry by changing the last 2 digits. I tried using that ip on the ubuntu as well, did not work. I would add this to the wonders of the 21st century. Feb 21, 2018 at 17:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.