Files, tunnels, and jumps

Run remote commands

Execute one quoted remote command and distinguish local expansion from remote shell interpretation.

9 minute lesson

~~~

Before choosing a tool or writing more code, make the requirement concrete. A diagnostic command uses explicit quoting and an absolute path rather than depending on an interactive profile.

The local shell parses the SSH command first, then the remote side runs the provided command according to its shell and account environment. The useful target is not encyclopedic coverage. Make one deliberate choice, observe its consequences, and know which requirement would make you revise it.

A common failure is to insert untrusted values into a remote shell command or assume every quote reaches the remote unchanged. The happy path may still work, which makes the mistake easy to miss. minimize shell interpolation, pass fixed commands, and inspect both local and remote parsing boundaries. Keep the first version small enough that every important input and output remains visible.

This supports the module goal: Use SSH as a controlled transport for commands, files, and connections while understanding each new exposure. Capture the request, command, trace, screenshot, test result, or other evidence that proves the result.

Run commands containing spaces, variables, and redirection and explain which machine interprets each token. Change one condition on purpose, predict the result, and compare the prediction with what actually happened.

Lesson completed

Take this course offline

Get every free book and course as PDF and EPUB files.

Get the download library →