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

How to Fix: SSH over IPv6 got "Permission denied" error

Troubleshooting SSH connection issues with IPv6 addresses on Linux servers.

Quick Answer: Check the sshd configuration and ensure that IPv6 is enabled on the server. Verify that the IPv6 address is correctly configured in the sshd_config file.

SSH over IPv6 is not working and results in a 'Permission denied' error, affecting users who want to connect to servers using IPv6 addresses. This issue can be frustrating for those who are familiar with SSH connections but encounter this problem when trying to establish a connection over IPv6.

The good news is that the problem can often be resolved by checking and configuring the server settings, as well as verifying the network connectivity between the client and server.

🔍 Why This Happens

  • One main reason for this error is that the SSH server on the server does not support IPv6. Although you have configured sshd to listen on a v6 address, it may still be using an older version of OpenSSH that does not support IPv6 connections. This can be due to the version of OpenSSH installed on the server or the configuration files.
  • Another possible reason is that there are issues with the network connectivity between the client and server, such as incorrect routing tables or firewall rules blocking the IPv6 connection.

🚀 How to Resolve This Issue

Update SSH server software

  1. Step 1: Update the OpenSSH version on the server to a recent one using apt-get: `sudo apt-get update && sudo apt-get upgrade openssh`.
  2. Step 2: Check the sshd configuration file (`/etc/ssh/ssh_config`) for any settings that may be causing issues with IPv6 connections. Make sure that the `ListenAddress` option is set to `[::]:311` and that the `AllowRootLogin` option is not set to `no`.
  3. Step 3: Restart the SSH service on the server: `sudo service ssh restart` or `sudo systemctl restart sshd`.

Check network connectivity and routing tables

  1. Step 1: Verify that the IPv6 address is correctly configured on the client and server using tools like `ip -6 addr show`. Make sure that there are no issues with the DNS resolution of the IPv6 address.
  2. Step 2: Check the network routing tables on both the client and server to ensure that they are correctly configured for IPv6 connections. Use tools like `ip -6 route show` to verify the routing tables.

🎯 Final Words

To resolve the 'Permission denied' error when SSHing over IPv6, first update the OpenSSH version on the server, check the sshd configuration files, and restart the SSH service. If the issue persists, check the network connectivity and routing tables between the client and server to ensure that they are correctly configured for IPv6 connections.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions