Why configure it
- The goal is to type
skyorssh skyinstead of repeatedly specifying username, host, and PEM key.35:27 - The same setup also supports uploading and downloading files between the local machine and the server.
35:27 - The speaker frames this as a time saver for anyone working across multiple computers.
35:43
SSH config
- Open or create
~/.ssh/config.35:56 - Add a
Host skyentry with the serverHostName,IdentityFile, andUser ubuntu.36:1436:3436:52 - After that,
ssh skyconnects directly to the instance.36:52
Shell helper
- A shell function named
skyis added to.zshrcon macOS/zsh or.bashrcon Bash systems.37:1437:31 - If no argument is given, the function runs
ssh sky.38:38 - If the first argument is
upload, the function usesscpover SSH to upload a local file to the remote machine.38:1039:35 sky downloaduses the same source-then-destination pattern, with a default destination such as the local Downloads folder.39:5840:37- After editing the shell configuration, the file must be sourced so the new function is available in the current terminal.
39:13
VS Code Remote SSH
- VS Code can connect to the same
skyhost through the Remote SSH UI because it reads the SSH config entry.41:36 - Once connected, VS Code can open folders such as the Weer project on the remote server.
41:53 - The speaker demonstrates editing a remote README from local VS Code and confirming the change through SSH.
42:29 - This workflow will later make remote configuration files, including NGINX files, easier to edit.
42:53