I have a Raspberry Pi connected to my home and at day 2 of this month I've opened the port 22 of my router so I could SSH it from anywhere. Today by curiosity, I decided to see the raspberry pi log, and I've found lines like this:
Mar 29 07:00:34 raspberrypi sshd[10242]: Failed password for root from 59.63.192.199 port 45555 ssh2
Mar 29 07:00:36 raspberrypi sshd[10242]: Failed password for root from 59.63.192.199 port 45555 ssh2
Mar 29 07:00:38 raspberrypi sshd[10242]: Failed password for root from 59.63.192.199 port 45555 ssh2
Mar 29 07:00:39 raspberrypi sshd[10242]: Received disconnect from 59.63.192.199: 11: [preauth]
Mar 29 07:00:39 raspberrypi sshd[10242]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=59.63.192.199 user=root
Mar 29 07:00:50 raspberrypi sshd[10246]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=59.63.192.199 user=root
Mar 29 07:00:51 raspberrypi sshd[10246]: Failed password for root from 59.63.192.199 port 38807 ssh2
Mar 29 07:00:53 raspberrypi sshd[10246]: Failed password for root from 59.63.192.199 port 38807 ssh2
Mar 29 07:00:55 raspberrypi sshd[10246]: Failed password for root from 59.63.192.199 port 38807 ssh2
Raspberry pi doesn't even have a root user, but I'm afraid. Is there any possibility something got invaded? I'm just learning to use the raspberry pi and today I was going to set a private key and disable password based SSH login. I'm going to also format the SD card and reinstall Raspbian, just to be sure.
The question is: I can't remember, but I THINK port 22 wasn't open at that the time of this login. Also, what does those port numbers mean? It says port 38807 for example. Where is this port? Aren't they trying to connect to 22?