SSH and VS Code
Plain `ssh phone` and VS Code Remote-SSH.
horus ssh is all you need day to day. But many tools only know plain ssh: VS Code, JetBrains Gateway, git remotes, scripts. One command sets things up so ssh pixel just works everywhere.
Set up plain ssh
Pair first
horus configwrites an entry for each paired phone. If you haven't paired yet, see Pair a phone.Write the config
your computer horus config --installyou'll see something like Wrote /Users/you/.horus/ssh_config with 1 phone(s). Added it to the top of ~/.ssh/config. Then: ssh pixel (also works in VS Code Remote-SSH)
Without
--install, horus prints theIncludeline for you to add to~/.ssh/configyourself.Connect
your computer ssh pixel
Each phone's entry connects through horus proxy, which sets up the USB connection each time. So ssh pixel works as soon as the phone is plugged in, with nothing else running. The phone's identity is checked against the one saved when you paired.
VS Code
VS Code's Remote - SSH extension lets you edit files on the phone as if they were on your computer. You get the file tree, search, the built-in terminal, and extensions.
Install the extension
In VS Code, open Extensions, search for Remote - SSH (by Microsoft) and install it.
Connect to the phone
Open the command palette (
⌘⇧Pon a Mac,Ctrl+Shift+Pon Linux), run Remote-SSH: Connect to Host… and pick pixel. The list comes from the config you just wrote.The first time, VS Code copies its server onto the phone. That takes a minute and needs internet on the phone.
Open a project
Choose File → Open Folder… and enter
/workspace/projects/your-app. VS Code's terminal now runs on the phone too.
Other tools
Anything that speaks SSH can use the host name, including your computer's own copy tools:
scp notes.md pixel:/workspace/projects/app/ rsync -a ./app/ pixel:/workspace/projects/app/