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).
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:
and replace user with the username and host with the WAN IP (i.e. firstname.lastname@example.org 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.