I'm trying to setup SSH over HTTPS. I'm on Windows, using OpenSSH trough Git. I have already created the keys and set the configuration for the alternative ssh server from the guide. I tried testing the connection with the command:
ssh -Tvvv git@bitbucket.org
But there is a connection error. I need help debugging it, due the fact that every source of information related to the error referes to the fact that "you tried SSH over an HTTPS server" which is what I'm suppoing to do to bypass the 22 port and make use of 443 thanks to atlassian. Here the log:
$ ssh -Tvvv git@bitbucket.org
OpenSSH_9.6p1, OpenSSL 3.2.1 30 Jan 2024
debug1: Reading configuration data /c/Users/maurell/.ssh/config
debug1: /c/Users/maurell/.ssh/config line 1: Applying options for *
debug1: /c/Users/maurell/.ssh/config line 23: Applying options for bitbucket.org
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/c/Users/maurell/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/c/Users/maurell/.ssh/known_hosts2'
debug2: resolving "altssh.bitbucket.org" port 443
debug3: resolve_host: lookup altssh.bitbucket.org:443
debug3: channel_clear_timeouts: clearing
debug3: ssh_connect_direct: entering
debug1: Connecting to altssh.bitbucket.org [104.192.142.46] port 443.
debug3: set_sock_tos: set socket 4 IP_TOS 0x48
debug1: Connection established.
debug1: identity file /c/Users/maurell/.ssh/bitbucket_work type 3
debug1: identity file /c/Users/maurell/.ssh/bitbucket_work-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.6
debug1: kex_exchange_identification: banner line 0: <HEAD><TITLE>Invalid HTTP Request</TITLE></HEAD>
debug1: kex_exchange_identification: banner line 1: <BODY BGCOLOR="white" FGCOLOR="black"><H1>Invalid HTTP Request</H1><HR>
debug1: kex_exchange_identification: banner line 2: <FONT FACE="Helvetica,Arial"><B>
debug1: kex_exchange_identification: banner line 3: Description: Bad request syntax</B></FONT>
debug1: kex_exchange_identification: banner line 4: <HR>
debug1: kex_exchange_identification: banner line 5: <!-- default "Invalid HTTP Request" response (400) -->
debug1: kex_exchange_identification: banner line 6: </BODY>
kex_exchange_identification: banner line contains invalid characters
banner exchange: Connection to 104.192.142.46 port 443: invalid format
The key information is "kex_exchange_identification: banner line contains invalid characters"