80 words
1 minutes
How to Set Up SSH Config for Easy Server Connections

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 ~/.ssh

2. Create Config File#

cat >> ~/.ssh/config << 'EOF'
Host myserver
  HostName 192.168.1.100
  User username
  IdentityFile ~/.ssh/key
EOF

chmod 600 ~/.ssh/config
OptionDescription
HostAlias for the connection
HostNameActual hostname or IP
UserUsername
IdentityFilePath to private key

3. Connect#

ssh myserver

That’s it.


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/
Author
[object Object]
Published at
2025-12-10