WassimBenzarti/colab-ssh

kex_exchange_identification: Connection closed by remote host

xd003 opened this issue · 7 comments

xd003 commented

I tried to connect to google colab via ssh using openssh
While it does runs properly intially and prints hostname , user and port at the end

But while connecting colab via ssh using the printed info , the connection is always failing . It returns the following error -

kex_exchange_identification: Connection closed by remote host
Connection closed by XX.XX.XX.XX port XXXXX

A quick google search about this issue lists this at the top if anyone wants to have a look - https://unix.stackexchange.com/questions/128894/ssh-exchange-identification-connection-closed-by-remote-host-not-using-hosts-d

I also got it tested from one another colab-ssh user and he too confirmed this issue exists at the moment .i would also like to add that it is very unlikely that there's something wrong in my device/openssh . Because i am able to connect to my vps instances using the same device very well . This issue is only occuring with google colab

I am not sure if Google Colab has done something from their end to block ssh connections or its something else

Thank you @xd003 for reporting this issue. We will do our best to fix it as soon as possible :)

Thank you for using colab-ssh and we really appreciate your contributions.

@WassimBenzarti I use ngrok to port forward SSH into Google Colab instance regularly and experiencing the same problem.

Some other people have also confirm this issue in this: demotomohiro/remocolab#79

I'm pretty sure Google had done something from their end since everything suddenly stop working. I already try changing away from the default port 22 and the problem still there. Hope we could share more about resolving this since SSH to colab is a huge thing for my day to day work :3

Yes, I tried a number of things, but I had no luck with any of them!
I am gonna still debug the issue and try few other solutions.

Sorry for inconvenience, hopefully this issue won't persist.

Thank you @xd003 and @lamhoangtung for your input.

I highly recommend that you read the description of the pull request #46. Here's the relevant part that resolves this issue

This update provides two new functions equivalent to launch_ssh and init_git. To create the SSH tunnel, you would do the following:

# Install colab_ssh on google colab
!pip install colab_ssh --upgrade

from colab_ssh import launch_ssh_cloudflared, init_git_cloudflared
launch_ssh_cloudflared(password)

# Optional: if you want to clone a github repository
init_git_cloudflared(githubUrl)

This is now working perfectly however the Cloudflare ones is acting wired

I tried to connect to google colab via ssh using openssh While it does runs properly intially and prints hostname , user and port at the end

But while connecting colab via ssh using the printed info , the connection is always failing . It returns the following error -

kex_exchange_identification: Connection closed by remote host
Connection closed by XX.XX.XX.XX port XXXXX

A quick google search about this issue lists this at the top if anyone wants to have a look - https://unix.stackexchange.com/questions/128894/ssh-exchange-identification-connection-closed-by-remote-host-not-using-hosts-d

I also got it tested from one another colab-ssh user and he too confirmed this issue exists at the moment .i would also like to add that it is very unlikely that there's something wrong in my device/openssh . Because i am able to connect to my vps instances using the same device very well . This issue is only occuring with google colab

I am not sure if Google Colab has done something from their end to block ssh connections or its something else

How did you run ngrok? It will work by running the command like this.
ngrok tcp 22
After that you won't get any error by connecting via openssh. Remmber to mention the relevent port.

Saben si a día de hoy sigue funcionado google colab o existe algo parecido