How to connect via SSH
SSH (Secure Shell) is the standard way to securely access your server's command line. It is encrypted, fast, and designed for real operations: deployments, troubleshooting, log review, and maintenance.
This guide starts with the simplest connection method and scales up to professional workflows used by admins and developers.

What you need before you connect¶
Collect these details first:
- Server IP or hostname (example:
203.0.113.10orserver1.example.com) - SSH port (default is
22unless you changed it) - Username
- Common:
root(VPS only), or a sudo user likegozenordeploy - Shared hosting typically does not provide full server SSH. If you have SSH on shared, it is usually jailed and limited to your account.
- Authentication method
- Password (beginner)
- SSH key (recommended)
Where to find them at GOZEN HOST: - Client Area service details (server IP, hostname) - Your provisioning email (initial login details)
Quick start: SSH in one line (works on macOS, Linux, and Windows 10/11)¶
Open a terminal and run:
If your SSH port is not 22:
First connection note: - You may be asked to confirm the server fingerprint. This is normal. Confirm only if the IP and server are correct.
Windows: 3 ways to connect¶
Option A: Windows Terminal or PowerShell (recommended)¶
Windows 10 and 11 include OpenSSH.
- Open Windows Terminal or PowerShell
- Run:
Option B: PuTTY (classic UI tool)¶
PuTTY is popular if you prefer a GUI.
- Install PuTTY
- Host Name:
SERVER_IP - Port:
22(or your custom port) - Connection type:
SSH - Click Open
- Login with username + password, or load a private key
PuTTY key formats:
- PuTTY uses .ppk
- If you have an OpenSSH key, convert it in PuTTYgen (Load -> Save private key)
Option C: Tabby (modern UI, session manager)¶
Tabby is a good fit if you manage many servers. Create saved profiles and connect with one click.
macOS and Linux: OpenSSH (default)¶
Open Terminal and run:
Useful extras:
-
Verbose output (great for troubleshooting):
-
Specify a private key:
Mobile (emergency access)¶
For quick checks on the go, use a reputable SSH client:
- iOS: Termius, Blink Shell
- Android: Termius, JuiceSSH
Tip: Use SSH keys with a passphrase. Avoid storing plain passwords in apps.
Beginner method: Password login¶
If your server allows password login, you will be prompted:
- Enter password (it will not show while typing)
- You should land in a shell prompt
Good practice: - Change the initial password after first login - Create a non-root sudo user for daily work
Recommended method: SSH keys (more secure and faster)¶
SSH keys eliminate password guessing risk and speed up logins. This is the professional baseline.
Step 1: Generate a key pair¶
macOS / Linux / Windows:
Press Enter to accept the default path and set a passphrase.
Step 2: Add your public key to the server¶
If password login works, the easiest method is:
If ssh-copy-id is not available (common on Windows), copy the public key:
Then on the server, append it to:
Paste the public key on a new line, save, exit.
Step 3: Test key login¶
If it still asks for a password:
- You might be using a different key than you think
- The permissions on .ssh or authorized_keys might be wrong
- The server might not allow public key auth
Intermediate: Make SSH easy with an SSH config file¶
Instead of typing long commands, create a profile in:
- macOS / Linux:
~/.ssh/config - Windows:
C:\Users\YOURUSER\.ssh\config
Example config:
Host gozen-prod
HostName 203.0.113.10
User deploy
Port 22
IdentityFile ~/.ssh/id_ed25519
ServerAliveInterval 30
ServerAliveCountMax 3
Then connect with:
This is how power users manage many servers without mistakes.
Advanced: Jump hosts (bastion) and ProxyJump¶
If your target server is not publicly accessible, you connect through a jump server.
One-off command:
SSH config example:
Host gozen-bastion
HostName 198.51.100.50
User gozen
IdentityFile ~/.ssh/id_ed25519
Host gozen-internal
HostName 10.10.0.15
User deploy
ProxyJump gozen-bastion
IdentityFile ~/.ssh/id_ed25519
Then:
Advanced: Port forwarding (tunnels)¶
Port forwarding lets you securely reach services that are not exposed to the public internet.
Local forwarding (most common)¶
Example: reach a database port only through SSH.
Then connect locally to 127.0.0.1:3306.
Remote forwarding¶
Expose a local service to the server side (use with care):
Dynamic forwarding (SOCKS proxy)¶
Useful for diagnostics and temporary secure browsing through a server:
Security note: - Tunnels are powerful. Use them intentionally and shut them down when done.
Security hardening checklist (best practice)¶
If you manage the server (VPS or dedicated style), aim for this baseline:
- Use SSH keys with passphrase
- Disable direct root login (use sudo users)
- Consider disabling password auth after keys are working
- Use a firewall to restrict SSH access where possible
- Keep OS packages updated
- Enable brute-force protection (Fail2Ban or equivalent)
Important: Changing the SSH port can reduce noise, but it is not real security by itself. Keys and access control are what matter.
Troubleshooting common SSH errors¶
Connection timed out¶
Typical causes: - Wrong IP - Wrong port - Server firewall blocks your IP - Network path issue (ISP routing)
What to do:
- Try ssh -p PORT user@IP
- Try from mobile data
- Use the checks in our "Server Not Accessible" article
Connection refused¶
Typical causes: - SSH service not running - Wrong port - Firewall actively rejecting
Try:
Permission denied (publickey)¶
This is key authentication failing.
Try verbose mode:
Common fixes:
- Ensure you are using the correct key (-i)
- Fix permissions on ~/.ssh and authorized_keys
- Confirm your username is correct
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!¶
This usually happens when: - The server was reinstalled - The IP was reassigned - You are connecting to the wrong server
Do not ignore it. Verify the server identity first.
If you confirmed it is your server, remove the old key entry:
What to send Support if SSH still fails¶
Send this in your ticket:
- Server IP and hostname
- Your username
- Your public IP (if known) and country/ISP
- The exact error message
- Output of:
ssh -vvv user@SERVER_IP(last 30 lines)- Your port and command used
We do not need your password. Do not send passwords in tickets.
Summary¶
- Beginners can connect with
ssh user@ip - Pros use SSH keys,
~/.ssh/config, and jump hosts - When something breaks,
ssh -vvvis your best diagnostic tool - Good SSH hygiene improves uptime and shortens incident resolution time
Related articles¶
- Server Not Accessible: What to check and what to send Support
- Connect your project to GitHub and push changes
- Free SSL setup and fixing “Not Secure”