Useful shortcuts and Commands in Mac

Shift-Command-3 captures the entire screen, and Shift-Command-4 allows you to select a specific area

Working with the terminal

On a Mac, the SSH configuration file, config, is typically stored in your home directory within a folder named .ssh. The full path is usually ~/.ssh/config. You can also find global configuration settings in /etc/ssh/sshd_config.

In VSCode:

cd /
cd ~/.ssh/
open config
open known_hosts

Here’s a brief explanation of each command:


🧭 cd /

  • Changes directory to the root of the filesystem.
  • / is the top-level directory on Unix/Linux systems.

📁 cd ~/.ssh/

  • Changes directory to the .ssh folder inside your home directory.
  • ~ refers to your current user’s home (e.g., /home/username/).
  • .ssh/ typically contains SSH-related files: keys, configs, and known hosts.

📝 open config

  • Tries to open the config file inside .ssh/.
  • This file stores SSH client settings, like:
    • Host aliases
    • Custom ports
    • Identity files (keys) for specific servers

On Linux, you’d typically use nano config, vim config, or cat config.
open is a macOS command that opens files with the default app.


🔐 open known_hosts

  • Opens the known_hosts file.
  • This file records fingerprints of SSH servers you’ve connected to.
  • Helps SSH verify you’re connecting to the same server (prevents spoofing).


Discover more from Science Comics

Subscribe to get the latest posts sent to your email.

Leave a Reply

error: Content is protected !!