SSH access using .pub key I don't know if I'm overthinking this too much but I can't seem to understand how to use a ssh public key to create an ssh connection trough my mac.  

I'll list my steps bellow:  


First created the SSH keys in my server in cpanel -> SSH keys and created a key pair with name id_rsatest  
Then I downloaded to my mac both public and private key files, so now in my downloads folder I have the files: id_rsatest and id_rsatest.pub  
Then I moved the id_rsatest.pub file to Users/myuser/.ssh/ and opened Terminal.app -> Shell -> New Remote Connection and entered the information below:



and receive this error:

ssh: connect to host example.com port 22: Operation timed out
[Process completed]



What am I doing wrong? Is this even the way on how to create a SSH access with SSH keys?
You got it the wrong way round :-)


create a key pair on the Mac you are using 
put both id_rsa.pub and id_rsa into ~/.ssh and run chmod 600 id_rsa
append the generated public key (id_rsa.pub) to .ssh/authorized_keys on the remote machine (your server in this case). If you are allowed to login in via ssh using a password, use

ssh remoteuser@remotemachine "mkdir ~/.ssh; cat &gt;&gt; ~/.ssh/authorized_keys" &lt; ~/.ssh/id_rsa.pub


otherwise transfer the file by whatever means you have to upload files.
run ssh remoteuser@remotemachine in your shell to connect


PS: The private key should never need to leave the machine it's generated on