colab-ssh icon indicating copy to clipboard operation
colab-ssh copied to clipboard

Customizing SSHConfig to minimize friction

Open rbracco opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. The problem is extremely minor and something I can live with, but ideally would be able to solve since I connect to colab almost every day. Please let me know if any of the issues below are solved and if they would be desired features/improvements. Thank you.

The issue is that I need to do the following steps when connecting.

  1. Choose the operating system of my remote (it's always Linux)
  2. Enter my password
  3. Navigate to my projects root folder (almost always the same project) and open that folder in vscode
  4. Enter my password again
  5. Known hosts file gets bloated with all these one time use cloudflare addresses.

Describe the solution you'd like I'd like to do the following and then PR it into the readme as an advanced setup so everyone can do it. I'd be happy to add to the advanced readme other tips and tricks I've figured out like port forwarding

  1. Find a way to set the operating system of *.trycloudflare.com to linux automatically so it stops asking. 2-4. Find a way to not have to use a password
  2. Find a way to set the home folder in SSHConfig (I think I can do this with RemoteCommand)
  3. This can be done by setting the UserKnownHostsFile to /dev/null for *.trycloudflare.com in the SSH config file (for Linux) or to C:\Users<Username>.ssh\tmp\known_hosts for windows (you must manually create the tmp folder)

Describe alternatives you've considered

  1. I researched this heavily and it can be set via the remote.SSH.remotePlatform in VSCode but it currently doesn't support wildcards. There is an open feature request
  2. I tried googling. I also tried setting password to empty string but it doesn't work.
  3. I tried RemoteCommand cd path/to/folder && code . and it wasn't working, I tried creating a cell that writes and sources a .bashrc file but it says the code command can only be launched from WSL or code terminal.
  4. Solved above

rbracco avatar Dec 28 '20 17:12 rbracco

Hello @rbracco,

At first glance, I really like your ideas, but due to the fact that I am attending exams for the next 2 weeks, I would like to regretfully inform you that I won't be able to discuss in detail the pull requests and issues during this period.

Nevertheless it would be amazing if you could implement these features and discuss them further more later.

Thank you for your understanding :) Happy new year!

WassimBenzarti avatar Dec 30 '20 21:12 WassimBenzarti

Thank you and happy new year. I also can't make this a priority at the moment but should have more time soon and as soon as I do I will report back and update.

rbracco avatar Jan 06 '21 14:01 rbracco