When you are executing a long-running script in any Linux distribution, you can make it run in the background of your terminal.
SSH keys are an easy and extremely secure way of logging into your server. This is a better alternative than a simple plain password.