by Jason Snell
Getting SSH keys to work in Sierra
I’ve wanted to adapt my image-uploading workflow to rely on command-line commands rather than Mac apps, as suggested by Dr. Drang, for a while now.
A few months back I got the first part of the script—replacing Photoshop with the
sips command-line utility—working without any trouble. But the second part of the equation, namely replacing an upload via Transmit with the
scp command-line utility, just wouldn’t work. I wasn’t interested in typing out my complex server password every time I ran the script, which was supposed to reduce friction in my workflow.
Good news! Dr. Drang has worked it out:
This post describes how to set up SSH keys on your both your server and your local Mac so the SnapSCP macro can upload your screenshots securely without forcing you to type in a password or passphrase.
Not only does this mean my scripts can now upload images directly without any user-interface involvement, but it means that I can open Terminal and connect to my server via
ssh without looking up the password.
The only thing I had to do above and beyond what Dr. Drang wrote was to delete an old copy of Fink, which I had no idea I had installed, by typing
sudo rm -rf /sw. Once that directory was gone, all of the commands in Dr. Drang’s post worked without a problem.