As root, use your favorite text editor (vi) to edit the sshd configuration file.
Edit the line which states ‘Port 22’. But before doing so, you’ll want to read the note below. Choose an appropriate port, also making sure it not currently used on the system.
# What ports, IPs and protocols we listen for
Switch over to the new port by restarting SSH.
Verify SSH is listening on the new port by connecting to it. Note how the port number now needs to be declared.
ssh email@example.com -p 50683