Software⏱️ 3 min read📅 2026-06-15

How to Fix: SSH jump hosts error

Understanding SSH jump hosts configuration issues.

Quick Answer: The issue arises from the use of %via-bastion in the ProxyCommand, which is not a valid option. Replace it with %h:%p to fix the error.

The SSH jump host error occurs when attempting to connect to an internal server through a bastion server using the '%via-bastion' syntax. This affects users who have configured their SSH client with the specified jump hosts in their ~/.ssh/config file.

This issue can be frustrating for system administrators and developers who rely on SSH jump hosts for secure remote access to internal servers.

⚠️ Common Causes

  • The primary reason for this error is that the '%via-bastion' syntax in the SSH config file is not supported by all SSH clients. The '-W' option used in the ProxyCommand is specific to OpenSSH and may not work with other SSH clients.
  • Another possible cause is that the bastion server's firewall or security settings are blocking the forwarded connection from the internal server. This could be due to a misconfigured proxy command or an incorrect network configuration.

🚀 How to Resolve This Issue

Configuring the ProxyCommand with the correct syntax

  1. Step 1: Modify the '%via-bastion' syntax in the SSH config file to use the '-W' option correctly. Replace the original ProxyCommand with: Host internal-server Hostname 10.0.0.123 User user2 ProxyCommand ssh bastion-server -W %h:%p
  2. Step 2: Save and reload the SSH config file to apply the changes.
  3. Step 3: Test the connection again using the updated ProxyCommand.

Enabling the '%via-bastion' syntax for specific SSH clients

  1. Step 1: Check if your SSH client supports the '%via-bastion' syntax. Some popular SSH clients like PuTTY and Git Bash support this feature, while others may not.
  2. Step 2: If your SSH client does not support the '%via-bastion' syntax, consider using an alternative method to configure the proxy command, such as using a separate SSH connection for each server.

💡 Conclusion

To resolve the SSH jump host error, it is recommended to use the primary fix method of configuring the ProxyCommand with the correct syntax. If this is not feasible, you can explore alternative methods to enable the '%via-bastion' syntax for your specific SSH client.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions