I opened port 22 on my modem and connected to my raspberry pi. Now when trying to login to pi from outside the local network using command: "ssh -P 22 WAN IP ADDRESS" it asks for a password which is not "raspberry". I was wondering if there is a default password for such connection or it's related to my modem (Mine is Actiontec C1000A).

  • @rob you've got it backwards, should be pi@address
    – lenik
    Nov 4, 2014 at 16:53
  • What do you mean with "I opened port 22 on my modem"? There are mainly two things you can do to "open" the port 22: 1. Run some service on the modem (router) itself, listening on port 22 (most likely ssh). 2. Forward port 22 to your Raspberry Pi's local IP. Number two is the thing you want to do. And like the others say: do ssh pi@WAN_IP_ADDRESS to login to the user account pi. When omitting pi@ you will login as the user with the name you have on the machine you are sitting at. And this user most likely does not exist on the RPi, so it will tell you always: your password is wrong. Nov 5, 2014 at 11:36

1 Answer 1


I actually just set this up on my raspberry pi/router earlier this morning.

If you're connecting via a linux machine, type this in the terminal:

ssh user@host

and replace user with the username and host with the WAN IP (i.e. pi@ but with your public IP)

You will be prompted to type yes or no to continue connecting and it will ask for user@host's password.

Enter the password for that user and it should work fine.

I've just tested it myself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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