Skip to content

JetBrains Fleet can't connect to a coder workspace due to missing support for ProxyCommand #9532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
matifali opened this issue Sep 5, 2023 · 7 comments
Assignees
Labels
use-case A novel and interesting way to use Coder

Comments

@matifali
Copy link
Member

matifali commented Sep 5, 2023

Can we do something to support IDEs that accept a direct ssh target?
Screenshot 2023-09-05 at 20 37 28

Someone requested this here https://youtrack.jetbrains.com/issue/FL-21135/Improve-SSH-configuration-support#focus=Comments-27-7952683.0-0
and
https://youtrack.jetbrains.com/issue/FL-21144/Add-support-for-ProxyCommand-config-option

Update: Fleet does read .ssh/config automatically, and we only need to pass the Hostname. The issue is it does not support ProxyCommand yet. Please take a look above for details.

Update (02-10-2023): Fleet now supports ProxyCommand but still has a few bumps to level up.

@matifali matifali changed the title JetBrains Fleet can't connect to a coder workspace as it can not read the .ssh/config file JetBrains Fleet can't connect to a coder workspace due to missing support for ProxyCommand Sep 5, 2023
@Emyrk
Copy link
Member

Emyrk commented Sep 14, 2023

Can we not have the target be a host configured in the ssh config?

@Emyrk
Copy link
Member

Emyrk commented Sep 14, 2023

When I put in my workspace name from the configured ssh, I see this in my loga:

[20230914 11:28:20.927 INFO  FR fleet.ssh.frontend.FleetSshSession] Unknown factories in ssh config MACs: [umac-64-etm@openssh.com, umac-128-etm@openssh.com, umac-64@openssh.com, umac-128@openssh.com]
[20230914 11:28:20.927 WARN  FR f.s.frontend.FleetKnownHostsVerifier] reloadKnownHosts(/dev/null) invalid file permissions: Permissions violation (GROUP_WRITE)
[20230914 11:28:20.927 INFO  FR fleet.ssh.frontend.FleetSshSession] Unknown factories in ssh config HostKeyAlgorithms: [sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, sk-ssh-ed25519-cert-v01@openssh.com]
[20230914 11:28:20.931 INFO  FR fleet.ssh.frontend.SshSupervisor] kotlinx.coroutines.TimeoutCancellationException: Timed out immediately
	at kotlinx.coroutines.core/kotlinx.coroutines.TimeoutKt.withTimeout(Timeout.kt:44)
	at kotlinx.coroutines.core/kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(Timeout.kt:74)
	at fleet.plugins.ssh.frontend/fleet.ssh.frontend.FleetSshSession$Companion$createSession$session$1$1.invokeSuspend(FleetSshSession.kt:142)
	at kotlin.stdlib/kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source)
	at kotlinx.coroutines.core/kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.core/kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.core/kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
	at kotlinx.coroutines.core/kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.core/kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.core/kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.core/kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

So it seems to be working, but there is an issue with some key exchange. I did this with another host config (not a coder workspace) and got it to work.

@matifali
Copy link
Member Author

@Emyrk Fleet does read .ssh/config automatically, and we only need to pass the Hostname. The issue is it still needs to support ProxyCommand. Please take a look at the issue body for related JetBrains issues.

@Emyrk
Copy link
Member

Emyrk commented Sep 19, 2023

seems related to #9673

SetEnv is ignored in the ssh config. So there is a few missing ssh features.

@matifali
Copy link
Member Author

matifali commented Oct 2, 2023

@matifali matifali added bug use-case A novel and interesting way to use Coder and removed feature labels Oct 2, 2023
@matifali
Copy link
Member Author

Hopefully, this will be fixed as 1.25.x is released.

@matifali matifali self-assigned this Oct 17, 2023
@matifali
Copy link
Member Author

As per Fleet version 1.25.206, Fleet can successfully connect to coder workspaces.

  1. Run coder config-ssh in a terminal
  2. Connect using SSH with the target coder.<workspace-name>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
use-case A novel and interesting way to use Coder
Projects
None yet
Development

No branches or pull requests

2 participants