Files, tunnels, and jumps

Transfer files with scp and sftp

Choose batch copy or interactive file transfer and verify direction, destination, permissions, and integrity.

9 minute lesson

~~~

Start from the behavior you can observe. A release archive uploads to a staging filename, is checksummed, then is moved into place deliberately.

File transfer over SSH inherits host and user authentication but still needs careful path and overwrite handling. The useful target is not encyclopedic coverage. Make one deliberate choice, observe its consequences, and know which requirement would make you revise it.

It is tempting to reverse source and destination or overwrite production paths without inspection. That trades a clear decision for an assumption you will eventually have to debug. The stronger move is to use explicit paths, test with a disposable destination, verify size or checksum, and set final ownership intentionally. Make the boundary explicit in code and in the project notes.

Tie the decision back to the larger job: Use SSH as a controlled transport for commands, files, and connections while understanding each new exposure. Record enough evidence that another developer can repeat the result without relying on your memory.

Upload and download a test archive, compare checksums, and verify the resulting remote permissions. Repeat it once with an invalid or hostile condition and write down the boundary the failure revealed.

Lesson completed

Take this course offline

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

Get the download library →