- Let's first see if you have a remote key. Open a terminal and type
more ~/.ssh/id_rsa.pub
If a random string of letters and numbers appears, then you already have a public key and you can skip to step 3. - Don't have a public key? Let's make one! Open a terminal and type
ssh-keygen
to generate a public key. Just keep hitting enter. It's going to ask if you want to save the key to/Users/USER/.ssh/id_rsa
and to make a passphrase. You want to save it to the default location and don't worry about the passphrase, just hit enter. - Copy the public key to the remove computer with the command
ssh-copy-id [email protected]
What this is doing is copying your key to.ssh/authorized_keys
on artemis. - Now you can log into artemis without a password. Try this
ssh [email protected]
Now that we have remote login working, we can write a simple backup script that can use with crontab
.