Budget-friendly, full-performance, fully equipped servers in any desired location.
ExploreBudget-friendly, full-performance, fully equipped servers in any desired location.
ExploreIf SSH access cannot be established, first distinguish the type of error; “connection refused,” a timeout, and “permission denied” do not point to the same cause. This guide traces the connection from the client to the server logs on a VDS or physical server where you have administrative access. If you use shared hosting, you cannot change service or firewall settings; you can only check the SSH option provided in the panel, the user, and the port specified by the provider.
Before starting, note the domain name or IP address you are connecting to, the username, the port, and the time when the error occurred. On a server where you have administrative privileges, you need access to the terminal, service logs, and firewall settings. In a shared hosting panel, check whether SSH is enabled for the account, which shell type is available, and the connection details defined by the provider.
“Connection timed out” generally suggests that requests are not reaching the destination or are being silently dropped by a network rule. “Connection refused” indicates that the destination was reached, but no service accepting connections was available on the specified port. If the username, password, or key is not accepted, “permission denied” is more likely related to authentication or account permissions than to the network path. This distinction prevents you from changing settings at the wrong layer.
ssh -v -p PORT USER@SERVER. Here, PORT, USER, and SERVER are placeholders; replace them with the actual information appropriate for the command line. Check at which step the connection ends in the output; if it breaks before authentication begins, do not change the key or password settings yet.If you have administrative access, inspect the SSH service status and system logs for the time period you noted when the connection attempt occurred. If there is no new log entry, the request most likely is not reaching the service; a firewall rule, access list, or network filter on the provider’s side becomes more likely. If a new entry appears but the service shows a condition similar to “refused,” the service status and the address/port on which it listens are more likely to be mismatched.
Before making a change, back up the existing firewall rule or SSH configuration, or write down the original values separately. Correct only the necessary port so that it is accessible from the necessary sources; do not add broad rules open to all sources. Change only one factor at a time. For example, if the connection log shows that a specific source address was blocked by the firewall, check the rule’s destination port and source scope, then make a correction covering only the expected network; changing the SSH port at random may merely conceal the same problem.
After the correction, repeat exactly the same failed operation with the same server, user, and port. Then inspect the log lines for the time of the new attempt. If the connection now proceeds to the authentication stage, the network layer has been corrected; address the key, password, or account permissions next. If it still times out, revert the single change you made and check the firewall and the provider network filter together. If an administrator console is available, applying the change while that console remains open is safer because it reduces the risk of locking yourself out of remote access.
If the port is reachable and the log shows an “authentication failed” or similar entry together with the username, check whether the account is actually authorized to use an SSH shell. In a shared hosting panel, SSH may not be enabled for the account, or only a specific shell may be available. On a managed server, the user account may be locked, expired, or outside the SSH access group. If these findings apply, correct the account permissions through the provider’s panel or administrator policies instead of repeatedly trying the password.
If you use a key, check in the client output whether the correct private key is being offered; never share the private key with anyone. If the relevant public-key entry on the server is missing or belongs to the wrong user, correct it only from a verified backup. If it is correct but still rejected, inspect security checks such as file ownership, permission policies, and the home directory used by the account; correct only the single cause indicated by the error instead of granting broad permissions.
For example, suppose an administrator receives a timeout when trying the correct IP and port, but sees in the firewall logs that the source address was blocked during the same minute. In this case, changing the key is not meaningful; record the original rule and make a narrowly scoped correction that allows only the approved administration network to access the relevant port. Retry the same connection, and if the new log shows an authentication entry instead of a block, the first problem has been resolved. If there is still no new entry, revert the change and investigate a provider network filter or an incorrect destination address.
If connections are established but then drop, the “refused” distinction in this guide may not be sufficient; the client network’s sleep policy, intermediate network devices, or session timeouts should also be investigated. First compare the times of the last successful and unsuccessful attempts, then move only to the layer indicated by the new evidence. Restarting the server or disabling security controls is not a safe solution when the cause has not been established.
As the next step, bring together the error text, destination port, and attempt time; if you use a managed resource, you can use this information to ask the provider about network or account restrictions. When you need more administrative control, you may review the Turkey VDS server plans page only to examine suitable environments; do not assume that the connection problem will resolve itself.
Copyright © 2026 All Rights Reserved
