I have a mac and I want to access my ubuntu Desktop's hardware remotely from anywhere to run some programs. I am aware of apps like teamviewer however I am only interested in using Ubuntu's terminal from my own mac terminal to run those programs without using the other GUI elements of my desktop OS. I was wondering if it is possible, if so how?
You can connect to your machine through SSH. Here is a tutorial on how to do it. In summary:
ssh {your ubuntu user}@{your ubuntu IP}
Remember you need to have an ssh server listening on your Ubuntu machine.
Take in account that if what you want to do is run X applications in your MAC (i.e. run an application that has windows) you will need to connect your X server from your Ubuntu machine to your Mac. Here is another tutorial for that.