Remote control your Mac with your iPhone and SSH Key Shortcuts

macOS Preperation – Enable Remote Login on target Mac

  1. Open System PreferencesMacOS System Preferences Icon
  2. Find Sharing (or search for “remote”)
    MacOS System Preferences with
 remote searched for
  3. Turn on Remote Login. Enable “All Users” or add just one.
    Remote Login Selected on MacOS Sharing System Preferences
  4. Note the machine name (dougbeal-mb1.local), you will need it for the shortcut. You can also edit the name here.
    Circled Network Name

Create ssh shortcut on iOS

  1. Launch Shortcuts application. Search for shortcuts Application
  2. Create a new shortcut. Create Shortcut
  3. Add Action to shortcut. Add Action
  4. Search for ssh and select Run Script Over SSH. Search for ssh and find Run Script Over SSH
  5. Tap Show More. Run Script Over SSH select Show More
  6. In the Authentication section, select SSH Key. Shortcuts will automatically generate a key for you. Run Script Over SSH select Authentication, SSH Key
  7. Tap Script and swipe above keyboard and tap Shortcut Input. Change Run Script Over SSH script entry to Shortcut Input
  8. Tap on SSH Key and tap on Share Public Key. Get the public key to your mac (AirDrop, Handoff Clipboard, Apple Notes will all work). SSH Key Dialog with Share Public Key Highlighted
  9. Install public key on Mac

    Assumes public key is on the clipboard.

    1. make sure .ssh directory exists
    2. mkdir -p ~/.ssh

    3. append public key to authorized_keys file
    4. pbpaste >> ~/.ssh/authorized_keys

    Create a shortcut to put Mac Display to sleep

    1. Create a new shortcut
    2. add action TEXT with:
      pmset displaysleepnow

    3. add action Run Shortcut, choose shortcut from previous section

    Now when you run the shortcut, your display will go to sleep.

    #NovBaD #NaBloPoMo #challenge2of30 #challenge #automation #shortcuts #iOS #macOS #SSH

What I want to accomplish or kick off in November

  1. #100DaysOfDraw #WeDrawWednesdays
    2019-11-06 to 2021-09-29
    Post Drawing no later than each Wednesday for the next 100 Wednesdays. Inspired by @MakeDoPod, Make Do on Relay FM
  2. November Blog-A-Day (#NovBaD #NaBloPoMo)
    Make blog post for each day of november. Inspired by NaNoWriMo and Jamie Tanna – National Blog Post Month (NaBloPoMo)

  3. Get out in front creating HWC Seattle events, publicize them better [2019-11-13, 2019-11-27]
  4. Register w/locality
  5. Figure out where to post HWC 10-16 notes
  6. Start Project planchette [dev] – 1 page scope/goal document
  7. Start project TB phase 1 [craft]
  8. find archive of college files and restore first webpage
  9. 4 weekly reviews! (inspired by @theweeklyreview)

Teaser for tomorrow: GitHub actions!

#NovBaD #NaBloPoMo #1of30 #challenges