This is the series of How to build / install / create an Elrond Node, either on Mainnet, Testnet or Devnet.
Part 05 – Changing the SSH Port | Disabling the Root access | Only allowing the new user access

INSTRUCTIONS:

1. login with theNewUserNameHere via ssh using putty, solar-putty, etc
2. open the sshd_config file: sudo nano /etc/ssh/sshd_config
3. chose a number between 49152 and 65535 and change # Port 22 to Port theNewPortNumber
4. restrict root login by changing PermitRootLogin yes to PermitRootLogin no
5. below this line add a new line: AllowUsers theNewUserNameHere
6. save the file with CTRL+x — type y — hit Enter
7. setup a firewall with a clean state resetting it and accepting it by typing: sudo ufw reset
8. allow theNewPortNumber like this: sudo ufw allow theNewPortNumber
9. then type and accept it by typing: sudo ufw enable
10. restart the ssh server/daemon for all these to have effect like this: sudo service ssh restart
11. keep this window open and use another ssh software to try and connect to the IP address with theNewUserNameHere and the private ssh key and see if it works directly without the use of password for theNewUserNameHere and if that works go to the next Point below, otherwise go back to the open window and see what got messed up and fix it or reopen the ports with allowing the password back and try to debug the entire thing until you get it working properly