How to configure SSH access on Hostinger
To configure SSH access on Hostinger, you need to enable SSH in your hosting control panel and create SSH keys for secure authentication. SSH access is only available on Business plans and higher.
Prerequisites
- Active Hostinger hosting account
- Business or higher hosting plan
- Basic knowledge of terminal commands
- SSH client installed on your local machine
Step-by-Step Instructions
Access your Hostinger hosting panel
Navigate to SSH Access settings
Enable SSH access
Generate SSH key pair
Add your public key
Configure your SSH client
ssh username@hostname -p 22. Replace username and hostname with the values from your Hostinger panel. If using a private key file, add -i /path/to/private-key to the command.Set up SSH config file (optional)
~/.ssh/config on your local machine to add a host entry with your Hostinger details. Include Host hostinger, HostName your-hostname, User your-username, and IdentityFile /path/to/private-key.Test your SSH connection
ssh username@hostname and verify you can access your hosting environment. Run basic commands like pwd and ls to confirm you're in the correct directory structure.Common Issues & Troubleshooting
SSH option not available in control panel
SSH access is only available on Business plans and higher. Upgrade your hosting plan or contact Hostinger support to confirm your plan includes SSH access.
Connection refused or timeout errors
Verify the hostname and port number in your SSH command. Check if your local firewall or ISP is blocking port 22. Try using ssh -v username@hostname for verbose output to diagnose the issue.
Permission denied with public key
Ensure your public key is correctly added in the Hostinger panel. Check that your private key file has correct permissions with chmod 600 ~/.ssh/private_key and verify the key pair matches.
Unable to access website files via SSH
Navigate to the public_html directory using cd public_html after connecting. Your website files are located in this folder, not in the initial login directory.