Windows Terminal: mac6 SSH Launcher
One PowerShell command (mac6) opens a 2x3 grid of Windows Terminal panes, each connected to the same Mac mini over SSH. The use case: on a portrait auxiliary monitor, three rows of two columns is a natural fit for running agents, log watchers, file checks, tests, and background tasks in parallel without Alt-Tab.
The pieces: a macssh function for a single SSH session (with optional port forwarding), and a mac6 function that arranges six of those sessions into a grid in Windows Terminal.
Layout
+----------+----------+
| Mac SSH 1| Mac SSH 2|
+----------+----------+
| Mac SSH 3| Mac SSH 4|
+----------+----------+
| Mac SSH 5| Mac SSH 6|
+----------+----------+
A mac4 (2x2) variant works on normal landscape screens — mac6 is for portrait.
Base function: macssh
Add to your PowerShell profile (notepad $PROFILE):
function macssh {
param(
[int]$Port
)
$MacUser = "your-username"
$MacHost = "your-mac-hostname.local"
if ($Port) {
ssh -L "${Port}:127.0.0.1:${Port}" "$MacUser@$MacHost"
} else {
ssh "$MacUser@$MacHost"
}
}
macssh— plain SSHmacssh 9119— SSH with port forwarding (e.g. agent dashboards, local model servers)
Launcher: mac6
function mac6 {
wt -w 0 new-tab --title "Mac SSH 1" powershell -NoExit -Command "macssh" `
; split-pane -H --size 0.333 --title "Mac SSH 5" powershell -NoExit -Command "macssh" `
; move-focus up `
; split-pane -H --size 0.5 --title "Mac SSH 3" powershell -NoExit -Command "macssh" `
; move-focus up `
; split-pane -V --size 0.5 --title "Mac SSH 2" powershell -NoExit -Command "macssh" `
; move-focus left `
; move-focus down `
; split-pane -V --size 0.5 --title "Mac SSH 4" powershell -NoExit -Command "macssh" `
; move-focus left `
; move-focus down `
; split-pane -V --size 0.5 --title "Mac SSH 6" powershell -NoExit -Command "macssh"
}
Build order: three horizontal splits to make 3 rows, then vertical splits to cut each row into 2 columns.
Gotcha: split-pane direction is counter-intuitive
| Flag | Split line | New pane position |
|---|---|---|
split-pane -V |
vertical line | left / right |
split-pane -H |
horizontal line | top / bottom |
The flag describes the cut line, not the layout direction. Easy to get backwards on first read.
One-time setup: SSH key login (so mac6 doesn't prompt 6 times)
# 1. Generate key
ssh-keygen -t ed25519 -C "windows-to-mac"
# 2. Copy public key to Mac
Get-Content $env:USERPROFILE\.ssh\id_ed25519.pub | ssh your-username@your-mac-hostname.local "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys"
After this, mac6 opens six panes and lands in a working shell in each.
General pane shortcuts
For split-pane, move-focus, and resize shortcuts in Windows Terminal, see Microsoft's Windows Terminal keybinding documentation.