0

I have a raspberry pi 3 running Raspbian connected through ethernet to my router (Orange Livebox), and I used to SSH into it through the local network with 192.168.1.99 (I set a static IP) or remotely, setting the port forwarding for SSH (as well as HTTP and FTP) to the pi.

However, the router now doesn't let me ssh the pi since when typing the user and password (I let the default pi and raspberry), and displays Access Denied when typing the password. I know that it's the router that is receiving the SSH, because when I try using the admin account with my router's password, it instantly closes the connection, instead of offering to retry another password.

This error only occurs with SSH and FTP, because I can access the website that's on it through HTTP when typing the local IP on a browser.

What rule/setting could be causing this? I currently have a screen/keyboard set on the pi but I'd like to use it headless...

1
  • As you were using default user/password, I wouldn't be surprised if someone on the internet logged in as user 'pi' and changed the default password for you...
    – wurtel
    Jul 31, 2019 at 12:48

1 Answer 1

1

First you need to be sure that you want to open ssh to the bad outside internet, if you realy want to also check out to harden your pi security.

What could be happening is that your router has a ssh deamon and sftp deamon on those port, so you are trying to log in to your router instead of your Pi.

You cloud forward a different fport on the outside to port 22 of the pi, something like:
externalip:2022 -> internalip:22.

This way you prevent hitting the default ssh port on your router. This is also a option for any other port-forward that is not working.

Other side effect is that you don't use the default port on the internet that bots try to break into.

2
  • Hmmm... tried this (and will keep it this way), but it still doesn't work so I think that there's something else going on... Whenever I connect through SSH to the pi, if the account isn't pi then whatever the password I type is, it just refuses directly the connection, so I guess I was wrong assuming that it's the router's fault, there really is something weird going on with the pi...
    – N1ark
    Jul 31, 2019 at 11:10
  • SSH always requires a username, by default any ssh client will send the current computer user as username for the connection. So if that user does not exists it will never be able to log into the pi with any password. You can create that user on the pi or create a ssh config file to change the default login user for the pi adress. ssh.com/ssh/config Aug 1, 2019 at 6:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .