September 23, 2026

The mac mini -- ssh keys

Getting the mac to run an sshd server is almost trivial and is explained elsewhere.

Logging into the mac

This involves copying my public key from trona to the mac ("chispa") and putting it into the right place. First on "trona" (my linux machine):
cd .ssh
scp trona_rsa.pub chispa:
Then on the mac:
cd .ssh
mv ../trona_rsa.pub authorized_keys
Just doing the "mv" above is OK, but in general you want to append to authorized_keys. There was no such file, so this works. Ensure that permissions are 644.

Indeed, now "ssh chispa" works immediately without a password.

Logging into other machines from the mac

We will have to generate keys for tom since we have never done this before. I could copy my keys from trona, but somehow I feel better about generating new unique keys.
cd .ssh
ssh-keygen -t rsa -b 4096
cp id_rsa.pub chispa_rsa.pub
scp chispa_rsa.pub cholla:
I distribute the key to cholla (my machine at the UA). I don't yet run an ssh server on trona, so I'll send the key over there later.

Note that naming the public key file with the unique host name avoids all kinds of confusion and possible file clobbering when you start moving keys here and there.

Once this is done, it is just a matter of distributing the public key as per the above, taking care to use "vi" to append the key to authorized_keys

I'll have to see how this works out with github where I currently authenticate as "tom" with a key. Now there will be another "tom" from a different host.


Have any comments? Questions? Drop me a line!