CodeCatalyst VSCode ssh connection timeout stuck dev environment

1

I have the problem when I want to connect in vs code to a aws codecatalyst dev environment via the aws toolkit extension, that the vscode ssh remote environment gets stuck in connecting to the host at

"Setting up SSH Host (details) Initializing VS Code Server"

After trying to connect via ssh I got the error message with more details:

"kex_exchange_identification: Connection closed by remote host

Connection closed by UNKNOWN port 65535"

Any Ideas?

asked 8 months ago464 views
1 Answer
1
Accepted Answer

After a long and tedious error search I finally could solve the issue.

Host aws...
ForwardAgent yes
AddKeysToAgent yes
StrictHostKeyChecking accept-new
ProxyCommand "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy RemoteSigned -File "c:\Users\{username}\AppData\Roaming\Code\User\globalStorage\amazonwebservices.aws-toolkit-vscode\codecatalyst_connect.ps1" %h

This command invokes a somehow not really documented and updated powershell script generated from the toolkit.

By debugging this script I found, that it makes an http POST request by using the windows powershell "Invoke-WebRequest" command. This command has given an error, which has not been logged.

The error was due to missing capabilities to parse the http response, to fix this the Internet Explorer or Edge needed to be run at least once. If this has not happend, windows does not initialize some libraries to use in powershell...

So everyone having these issues on windows when want to connect to aws codecatalyst dev environemtns via VSCode make sure to do the following:

have openssh installed version > 7.6 have run InternetExplorer or Edge at least one time

Imagine I would have tested this on a windows os where IE or Edge would have been run/initilaized already, would have never found this bug....

answered 8 months ago
profile pictureAWS
EXPERT
reviewed 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions