Last active
June 1, 2022 09:48
-
-
Save proguy914629bot/5e745d1afa3399adc599724f683fe716 to your computer and use it in GitHub Desktop.
Google Colab SSH Access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import getpass | |
from google.colab import drive | |
drive.mount('/content/gdrive/') | |
os.system("wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip") | |
os.system("unzip -qq -n ngrok-stable-linux-amd64.zip") | |
print("Get your authtoken from https://dashboard.ngrok.com/auth") | |
authtoken = getpass.getpass() | |
get_ipython().system_raw('./ngrok authtoken $authtoken && ./ngrok tcp 22 &') | |
print("SSH Setup Complete! Please visit https://dashboard.ngrok.com/status to view the URL.") | |
print("You can SSH by doing something like:") | |
print("ssh root@<url> -p <port>") | |
print("Happy Coding!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment