You can use SSH over the Internet by opening a port in your router configuration just as it is demonstrated in the Synchronizing files over the Internet recipe. When doing so, your Banana Pi's SSH server is accessible over the Internet. This means that everybody is able to log in to your Banana Pi. This is especially risky if you have not changed the default password.
You use a different port. For example, you could use port 22222 instead of the default 22. This will keep away a lot of potential attackers using superficial port scanners.
You disable the password login to your SSH server by using SSH keys as the authentication method.
You disable the possibility to log in as root by setting the variable
In this recipe, we are going present the second method. Thus, we generate SSH keys and disable...