How to Connect to a Dedicated Server Using SSH
SSH, or Secure Shell, allows you to securely connect to and manage a Linux-based dedicated server remotely. After connecting, you can manage files, install software, update the operating system, configure services, review logs, and perform other server administration tasks.
Follow the steps below to connect to your ApnCloud Dedicated Server using SSH.
1. Find Your Server Login Details
Before connecting, make sure you have the required server information.
- Server IP address
- SSH username
- Password or SSH key
- SSH port
For many Linux dedicated servers, the administrative username is commonly:
root
However, your server configuration may use a different administrative user. Keep all server login information secure.
2. Connect from Windows
Modern versions of Windows usually include an SSH client through Windows Terminal, PowerShell, or Command Prompt.
Open a terminal and enter:
ssh root@YOUR_SERVER_IP
Replace YOUR_SERVER_IP with your actual dedicated server IP address.
For example:
ssh [email protected]
If your server uses a different username, replace root with the correct account name.
3. Connect from macOS or Linux
On macOS or Linux, open the Terminal application and enter:
ssh root@YOUR_SERVER_IP
Then press Enter.
4. Connect Using a Custom SSH Port
If your SSH service uses a port other than the default SSH port, specify it using the -p option.
ssh -p PORT username@YOUR_SERVER_IP
Replace PORT, username, and YOUR_SERVER_IP with your actual server information.
5. Verify the Server Fingerprint
When connecting for the first time, SSH may display the server fingerprint and ask whether you want to continue.
Make sure you are connecting to the correct server before accepting the fingerprint. After confirmation, your computer will normally remember the server identity for future connections.
6. Enter Your Password
If password authentication is enabled, SSH will ask for your server password.
Type the password and press Enter. You may not see characters or symbols while typing the password. This is normal behavior in SSH terminals.
7. Successful Login
If your login details are correct, you will receive command-line access to the dedicated server.
From here, you may be able to:
- Manage server files
- Install software
- Update packages
- Configure web servers
- Manage databases
- Review system logs
- Configure firewall rules
- Monitor server resources
- Manage applications
Be careful when running commands with administrative privileges.
8. Use SSH Keys for Better Security
SSH key authentication can provide stronger security than relying only on passwords.
An SSH key normally consists of:
- A private key stored securely on your computer
- A public key added to the server
Never share your private SSH key.
9. Common SSH Connection Errors
If you cannot connect, check the following:
- The server is powered on
- The server IP address is correct
- The username is correct
- The SSH port is correct
- The password or SSH key is correct
- The SSH service is running
- The firewall allows SSH access
- Your internet connection is working
Connection timed out: This may indicate a network, firewall, routing, or port-related issue.
Connection refused: This may indicate that SSH is not running or is not listening on the expected port.
Permission denied: This usually means the username, password, SSH key, or authentication settings are incorrect.
10. Disconnect from the Server
When you are finished managing your server, enter:
exit
Then press Enter to close the SSH session.
Security Recommendations
- Use strong and unique passwords
- Use SSH keys where appropriate
- Never share administrator credentials
- Keep the operating system updated
- Limit unnecessary open ports
- Configure firewall rules carefully
- Monitor suspicious login attempts
- Maintain regular backups
Need Help?
If your Dedicated Server is active but you cannot establish a network connection due to an ApnCloud service or infrastructure issue, please open a Support Ticket from your ApnCloud Client Area.
Include your server IP address and the exact error message you receive. Never include your root password or private SSH key in a support ticket.