iMac can't connect to MacBook Air to share files
I've had an iMac for a while and my wife just got a MacBook Air. I want to set up my iMac as a server or something so when we are home or traveling we will be able to access the files from the iMac with the MacBook.
When on my iMac, I go into the network location from the finder sidebar and see the MacBook but when I click on it it says connection failed. I have been trying a bunch of things to get this to work, when I first started I was able to share screen but could not connect with the connect as, now it just says connection failed and I can't even share screen.
I turned file sharing on on both computers and I even tried setting up a server with the connect to server feature under Go on the MacBook, I put in the smb://ipaddress/name of my iMac as a favorite server and when I connect to it is asks for a name and password, I try to connect as a registered user but I can't get the name or password right. I don't know what name and password to use there, I have tried mine that is used to log into the iMac and hers that is used to log into the MacBook but nothing has worked.
Any help would be greatly appreciated.
iMac with Retina 5K display, macOS 10.15