Ssh service tunnel can't connect pc through my domain name

This problem has been bothering me for days.
Please help me , thanks.
I want to use other computer’s shell client to remotely ssh to my home computer using my personal domain name.
I have created some web service tunnels, http has no problem opening my computer’s web service, but ssh has tried many methods and can’t connect successfully,
I can connect with ssh using ip in the local area network, and my linux server firewall is inactive.
I don’t know if I chose the wrong service type or something else.

$ ssh [email protected] -vvv
OpenSSH_8.5p1, OpenSSL 1.1.1k  25 Mar 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/c/Users/\347\231\276\350\266\243\347\275\221/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/c/Users/\347\231\276\350\266\243\347\275\221/.ssh/known_hosts2'
debug2: resolving "xxxxxx.com" port 22
debug3: ssh_connect_direct: entering
debug1: Connecting to xxxxx.com [104.x.x.x] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: connect to address 104.x.x.x port 22: Connection timed out
debug1: Connecting to xxxx.com [172.x.x.x] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: connect to address 172.67.x.x port 22: Connection timed out
debug1: Connecting to xxx.com [2606:4700:xx::xx:xx] port 22.
debug3: set_sock_tos: set socket 3 IPV6_TCLASS 0x48
debug1: connect to address 2606:4700:3031::xx:xx port 22: Network is unreachable
debug1: Connecting to xxxx.com [2606:4700:xx::x:bb3c] port 22.
debug3: set_sock_tos: set socket 3 IPV6_TCLASS 0x48
debug1: connect to address 2606:4700:3037::xxx43:xxx port 22: Network is unreachable
ssh: connect to host xxxxx.com port 22: Network is unreachable

Assuming that you are not using Cloudflare Access to protect this SSH endpoint:
You still need to run cloudflared from the client machine in order to connect to this SSH endpoint - you can’t just directly connect to the hostname port 22. What you should do is, download cloudflared to the client machine and run this command:

C:\path\to\cloudflared.exe access ssh --hostname ssh.yourdomain.com --url localhost:12345
Where --url port can be anything above 1024.

Then, use the SSH client to connect to the localhost port 12345 (based on the command above) in order to connect.

However, if you configured Cloudflare Access on this SSH endpoint and enabled SSH Browser Rendering function, you may just SSH into the machine via the browser.

1 Like

The docker container I use, I have run the Cloudflare generated command and the status is active.
No other renders have been configured.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.