Enable SSH access over IPv6

Nov 13, 2025

First, check if the SSH port is open

sudo ss -tlnp | grep :22

We need to change the ssh config to allow access from IPv6 address

sudo nano /etc/ssh/sshd_config

Add the following blocks in the configuration file

ListenAddress 0.0.0.0 # Allows connection via ipv4 
ListenAddress ::  # Allows connection via any ipv6 address

# If you want to allow ssh access from specific IP addresses, you can define it here.

Save the file and restart the ssh service

sudo systemctl restart sshd

And you're done.

Test the connection

ssh sam@[2400:1a00:4c31:baa6:be34:11ff:fe80:3d5f]

Congrats, now you can access the machine via IPv6 address.