- I recently needed to log into a Mac I keep running at my home while I was away travelling. There are a few options for how to do this, the simplest of which is to connect to via SSH.
- Since I ran into trouble at first so I wanted to write this post to make the process easier for you than it was for me.
- I was away from home recently but still wanted to be able to log into a Mac mini I use as a home media server while I was away.
- There are several solutions for this, including Screens 4 by X. But for my purposes, accessing the Mac’s file system using the terminal was plenty.
- I recently wanted to log into a Mac mini I use as a home media server using the terminal from a remote location and ran into some trouble
- Since it took a bit of googling and configuring to get things working, I thought I’d write the blog post I wish I’d found
- I have a Mac Mini I use as a home media server
- stores file archives + video files I play on my Apple TV using Plex
- I wanted to have a way to
sshinto the Mini so I could organize its files usingvifmin my terminal rather than having to connect to the screen and use Finder- I find
vifmmuch faster and more pleasant to use than Finder since its a keyboard-only way of managing files
- I find
✅ Steps
-
Enable remote login on target Mac
-
Note ssh command:
ssh user@host -
Test on local network — command should work
-
MOVE TO KITTY SSH POST: If using Kitty and noticing odd behaviour as you type after connecting,
exitand try logging in again with this command:kitty +kitten ssh user@host.r/linux4noobs - Comment by u/osu_randy on “Kitty terminal with ssh issues”
-
In my case, Kitty didn’t work properly at first, but Terminal, iTerm or Warp all do
-
-
Test on remote network - command will likely fail
-
Why does my
ssh user@hostcommand work while on the same WiFi network, but timeout remotely?ssh: connect to host [IP_ADDRESS] port [PORT_NUMBER]: Operation timed out
- answer: need to set up port forwarding from router’s WAN (public IP) address to your server (Mac)’s LAN (private IP) address
-
-
Set up port forwarding on your router
- Easiest to do this while you’re still at home
- See TP Link video for explanation of why this is needed
- For me, these steps were helpful:
- Note router’s WAN (public IP) address
- Note computer’s LAN (private IP) address on the DHCP client list
- Reserve server’s private IP address to prevent it from changing in the future
- Set up port forwarding
🐈 Kitty-specific steps?
- Split this article into basic steps + Kitty steps?
- Write two posts: one for the basic method above, and a second “awesome/supercharged/better” method with Kitty’s ssh kitten: Truly convenient SSH
- This section shows predefining some settings Kitty should apply to the host machine, including copying over my
.zshrcand other config files (so I’ll have them on any remote server)
Inbox
- Allow a remote computer to access your Mac - Apple Support (CA) - Apple’s official instructions for setting up remote access to a Mac
- How to Access Your Mac over SSH with Remote Login - Boolean World
- How to set up Port Forwarding on a TP-Link router