Skip to content

Instantly share code, notes, and snippets.

@bikcrum
Last active October 16, 2024 03:23
Show Gist options
  • Save bikcrum/f9d4cfb0c40dff23329b89cd664d4964 to your computer and use it in GitHub Desktop.
Save bikcrum/f9d4cfb0c40dff23329b89cd664d4964 to your computer and use it in GitHub Desktop.
This is the way how can you connect google colab as well as google drive (mounted) using SSH. This is useful when you want to download data directly to your google drive specially for machine learning purpose. It can be easy to mount google drive and use files into for your code.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yunshiuan
Copy link

@bikcrum Thank you so much for this helpful post! It really saves me!

@danielajisafe
Copy link

http://localhost:4040/api/tunnels is not available. Hence, giving a

ConnectionError: HTTPConnectionPool(host='localhost', port=4040): Max retries exceeded with url: /api/tunnels (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7c1f67e215a0>: Failed to establish a new connection: [Errno 111] Connection refused'))

@russellvt
Copy link

russellvt commented Oct 16, 2024

I'd likely at least amend this to include a direct reference to NGrok, if that's what you want to use for tunneling. Blindly downloading binaries from other sites generally isn't recommended.

I'd also recommend not completely overwriting the sshd_config file, but using a local config for the user, instead (read: there's likely a better way to do this tunnel).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment