Categories
Tags
Astro Camping CLI Codex Component Design Configuration Copilot CUDA Cursor Day Trip Dynamic Routing Editor Error Error Fix Error Handling Gemini git GitHub GitHub Copilot Google Hiking Hot Springs Installation Iwate Prefecture Kobe Linux Mac Meteor Shower Nara Prefecture NoAdapterInstalled Node.js nvm OpenAI params PowerShell props Public Key Authentication Python Redirect SEO SSH SSH config ssh-copy-id Stargazing Static Site Student Visual Studio VS Code VS2026 Windows WSL
80 words
1 minutes
How to Set Up SSH Config for Easy Server Connections
Table of Contents
Introduction
Typing -i options and user@host every time you SSH into a server is tedious. This guide shows you how to set up a config file to make connections easier.
Steps
1. Prepare .ssh Directory
mkdir -p ~/.ssh
chmod 700 ~/.ssh2. Create Config File
cat >> ~/.ssh/config << 'EOF'
Host myserver
HostName 192.168.1.100
User username
IdentityFile ~/.ssh/key
EOF
chmod 600 ~/.ssh/config| Option | Description |
|---|---|
Host | Alias for the connection |
HostName | Actual hostname or IP |
User | Username |
IdentityFile | Path to private key |
3. Connect
ssh myserverThat’s it.
Related Articles
For creating SSH keys and registering public keys, see:
How to Use ssh-copy-id
How to Set Up SSH Config for Easy Server Connections
https://naonao-na.com/en/posts/ssh-set-config-windows/
