I am not asking about autologin to check your 'security'. When your lightdm autologin is activated, your login.keyring is not unlocked automatically because you don't enter your password. Some apps may want to access your login keyring, and you may see a prompt to unlock it.
Simply copying and pasting something from the Internet and applying it to your system is not a path to security, it is a path to disaster. You must understand what you are doing. @ericmarceau has posted some configs for SSH server, but Ubuntu desktop system does not even have SSH server preinstalled (only SSH client).