> articles

Articles

SSH and terminal know-how: the “why” behind everyday things, in plain words.

  1. Script fails with $'\r': command not found? CRLF and LF line endings

    A script written on Windows fails on Linux with bad interpreter or command not found? Where CRLF and LF line endings come from, how to tell which one a file uses, and how to fix it with dos2unix, sed and Git's settings.

  2. Why does an idle SSH session disconnect? Broken pipe and keepalives

    Leave SSH idle and come back to a frozen terminal or "Broken pipe"? Why routers and firewalls cut idle connections, how to set ServerAliveInterval and ClientAliveInterval, and how to keep your work when the connection drops anyway.

  3. What is SSH ProxyCommand? Connecting when port 22 isn't open

    ProxyCommand has ssh reach the server through another program's input and output. How it works, how to write %h and %p, how it relates to ProxyJump, and how to connect through an HTTP proxy, Cloudflare Access or AWS SSM.

  4. How to add two-factor authentication to SSH, and how TOTP codes work

    Add a 6-digit code from your phone to SSH logins. How TOTP works, how to set it up on a server with google-authenticator, why logging in with a key skips the code, and what to do when SFTP and scripts stop connecting.

  5. Why doesn't Shift+Enter add a new line in some terminals? The kitty keyboard protocol

    In tools like Claude Code, Shift+Enter adds a line in some terminals and sends the message in others. Here's why, and what the kitty keyboard protocol does.

  6. How do I get a notification when a remote command finishes? OSC escape sequences explained

    Desktop notifications from remote commands, copying from vim on a server to your local clipboard, clickable links in the terminal. OSC sequences do it all.

  7. What is WebDAV? How to use it, and how it differs from SFTP

    WebDAV shows up in Zotero, Obsidian, Nextcloud and NAS settings. What it is, what to enter, how to mount it as a drive, and how it compares with SFTP.

  8. How to use rz and sz to upload and download files in a terminal

    When a terminal is all you have, rz uploads and sz downloads files with ZMODEM. What they are, how to install and use them, and what to do when they fail.