Connect to google collab with ssh from console from PC

后端 未结 2 1575
耶瑟儿~
耶瑟儿~ 2021-02-10 17:31

I\'ve found one instruction on the net how to do it:

#Generate root password
import random, string
password = \'\'.join(random.choice(string.ascii_letters + stri         


        
相关标签:
2条回答
  • 2021-02-10 17:40

    You need to setup an account with ngrok.

    Followed by which you will receive an authorisation code.

    You can then got to the tunnels section of ngrok website and find the session you created.

    Then ssh into the remote server:

    ssh root@0.tcp.ngrok.io -p <port_number>
    

    and use the password generated in the code to connect.

    0 讨论(0)
  • 2021-02-10 17:54

    I had your same issue. To solve it you have to ssh to the instance as root user:

    ssh root@0.tcp.ngrok.io -p <your_port>
    

    And then when it prompts you for a password you have to paste the password that's randomly generated at the beginning of the script (found in the password variable in your script)

    0 讨论(0)
提交回复
热议问题