簡體   English   中英

root@0.tcp.ngrok.io:權限被拒絕(公鑰,密碼)

[英]root@0.tcp.ngrok.io: Permission denied (publickey,password)

參考: https://medium.com/@meet-minimalist/how-to-ssh-into-google-colab-and-run-scripts-from-terminal-instead-of-jupyter-notebook-3931f2674258

我曾嘗試將 SSH 輸入 Google Colab,生成密碼后,我在終端(Ubuntu 20.04)中輸入以下命令:

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

它需要密碼,我試圖使用在我的許可被拒絕之前生成的密碼。

如果“我如何 ssh 到 google colaboratory VM? ”中的解決方案不起作用,您可以嘗試改用 Divakar Verma 的“ Colab-SSH-and-GDrive ”。

  1. ngrok創建您的免費帳戶並獲取 authtoken。
    這將在 Step4 中使用。
    應該看起來像$./ngrok authtoken ZT64bWYnXsdTAdfdassJej42auAQqKqZHn2Sh4g2sfAD

  2. 獲取本地機器的公鑰。

     $ ssh-keygen $ cat.ssh/id_rsa.pub
  3. Go 到您的 colab 筆記本。 從上面提供的模板( ssh_colab.ipynb )復制內容。

  4. 執行 colab 筆記本。 掛載您的 Google 雲端硬盤。 出現提示時,輸入在 Step1 中獲得的 authtoken。 最后,它會詢問您在 Step2 中獲得的本地機器的公鑰。

  5. Now you should get output something like ssh root@0.tcp.ngrok.io -p 12**6 .
    根據您的情況,端口會有所不同。 Go 到您的本地計算機並運行此 ssh 命令。 完畢!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM