I would like to use putty to connect to my local Ubuntu 18.04 machine. Is that pointless if I am only going to be using it locally? My interest stems from wanting to be able to edit vim files and use the command line on the local machine. I was thinking that maybe there is a way for the ssh server on my Ubuntu machine to be more secure, given that it's only going to be accessed locally.
One thing that I am unsure about is what port number to use.
Assuming I've understood your question correctly, you want to control an Ubuntu machine that is on your LAN, correct? If you wish to SSH into it from a Windows computer, then yes, PuTTY would be the way to go. Port 22 is the default in SSH. However, if you're doing it from another Ubuntu/Debian based machine, there wouldn't be a need to use it.
You can run the following on the computer you wish to SSH into (the computer to be controlled):
Then on the computer you wish to use to SSH into the remote system:
For example:
If you don't know the LAN IP, use the command ifconfig on the remote computer. This will output details about each network interface. Find the one in use, then look for inet (not to be computed with inet6), and you will find the IP address you need to use.
It will ask you for a password. This will be the password that particular user would use on the remote machine. You will also be asked on your first SSH session if you want to trust the remote machine's key.
More information on the openssh-server package and further refining the setup process can be found here.