pro.webssh.net: Unable to Establish SSH/SFTP Connections to Hostnames Resolving to IPv6 Addresses on iOS WebSSH

Bug description

I am unable to establish SSH and SFTP connections to my server using WebSSH v28.3.14565 on iOS v18.2.1. The issue occurs specifically when connecting to a hostname (e. g., mydomain.com) that resolves to an IPv6 address. If I use the server’s IPv4 address directly, the connection is established successfully.

None of the DNS resolution strategies available within WebSSH resolve the issue. The iOS app fails to establish a connection regardless of the chosen strategy.

This issue cannot be reproduced on macOS, where the same version of WebSSH functions flawlessly, even when connecting to the same hostname resolving to an IPv6 address. Additionally, macOS’s default terminal connects without any issues. I have enabled iCloud sync to ensure consistency across devices and verify the setup, yet the problem persists on iOS while macOS WebSSH connects without error.

Steps to Reproduce

  1. Create a new server configuration with the following details:
    • Server name
    • Host that resolves to an IPv6 address
    • Port knocking sequence
    • Username
    • Private key
    • Port number
  2. Attempt to connect to the server.
  3. Receive the following message: “Connection Failed: Can not establish connection to [MYDOMAIN.COM]”
  4. Experiment with all available DNS resolution strategies in WebSSH and confirm that none resolve the issue.
  5. Repeat the process using the server’s IPv4 address instead of the hostname, and observe that the connection is established successfully.

Log report

<EngineLog>
    <Connect_Ssh>
        <EngineVersion>9.5.0.99</EngineVersion>
        <EngineStatus>2</EngineStatus>
        <connectInner>
            <hostname>[MYDOMAIN.COM]</hostname>
            <port>[MYPORT]</port>
            <sshConnect>
                <connectSocket_v2>
                    <socketErrno>65</socketErrno>
                    <socketError>No route to host</socketError>
                </connectSocket_v2>
                <error>Failed to establish initial TCP/IP connection</error>
                <hostname>[MYDOMAIN.COM]</hostname>
                <port>[MYPORT]</port>
            </sshConnect>
        </connectInner>
        <error>Failed.</error>
    </Connect_Ssh>
</EngineLog>

Additional information

  • The issue seems to be limited to hostnames resolving to IPv6 addresses on iOS. Using the server’s IPv4 address allows the connection to succeed.
  • None of the DNS resolution strategies within WebSSH resolve the issue; the app fails regardless of the selected option.
  • The problem cannot be reproduced on macOS, where both IPv4 and IPv6 connections function correctly using the same version of WebSSH or the macOS terminal.
  • The issue is independent of the network connection type (Wi-Fi or mobile data).

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 23 (11 by maintainers)

Most upvoted comments

Yes, it is strange.

I only see log entries when establishing a (successful) connection via macOS WebSSH. I do not see anything with iOS, hence assuming whatever happens within iOS WebSSH never reaches the server.