SSH direct connection

Hello! First, I'm no sysadmin or anything, so please bear with my ignorance. I'm trying to setup coder on my lab's server, and everything has gone great for now, except that I don't seem to be able to establish a direct connection. I connect to the web UI through a SSH tunnel, so for instance the terminal app of my workspace works perfectly fine (from 127.0.0.1:3000/@username/workspace_name.agent_name). However, when doing ssh coder.workspace_name after a coder config-ssh in my local terminal, I feel a lot of lag. I confirmed the connection is not direct first with connecting through the VS Code extension --which shows I'm going through a relay-- and running coder speedtest -d workspace_name, which waits for a direct connection forever. I feel like I'm missing something super simple to solve the issue, but can't figure it out. So if anyone could help, I'd greatly appreciate! Cheers!
14 Replies
Codercord
Codercord10mo ago
<#1210272211664117810>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
totolouf
totoloufOP10mo ago
Update: I do get a direct connection from home, but not in the lab when using eduroam, so the issue might come from how eduroam is configured
Atif
Atif10mo ago
Coder uses tailscale/wireguard tunnels and should be able to connect directly in most cases but there are certainly cases when it becomes difficult. cc: @Cian
Cian
Cian10mo ago
Eduroam is like a VPN isn't it? What does your network look like? Where are you connecting from in relation to your workspace agent? You might want to read https://github.com/coder/coder/blob/main/docs/networking/index.md and https://github.com/coder/coder/blob/main/docs/networking/stun.md for more details on how the direct connections work, but if you have to do a SSH tunnel to access your Coder instance I think it is likely related to how your network is set up. coder ping -n 1000 -v <workspace> should show some useful information
Phorcys
Phorcys9mo ago
Eduroam is some school/univ-related Wi-Fi setup I don't really know what's special about it but i do remember it's pretty heavily gated hey @totolouf, did you get this sorted out ?
ajeygore
ajeygore9mo ago
Hi Folks, I am looking for one more question on SSH, I wanted to use mosh instead of ssh, but it does not look like I can do that? Also, is there anyway, I can login to ssh from ipad.- because I can’t configure coder there 😦 hey @totolouf did you get this working?
Phorcys
Phorcys9mo ago
you can't really do that but anyways Mosh is really really outdated so I wouldn't recommend it Coder's SSH goes through Tailscale to achieve p2p to your workspace even in different networks so the latency is very good I have used it outside on the bus and only had minor latency issues
ajeygore
ajeygore9mo ago
@Phorcys Thanks for clarification, I read through wireguard and tailscale, I think I am dropping the idea of using mosh. But is there any way for us to share config so that i can ssh from ipad? or using web terminal is the only way to go?
Phorcys
Phorcys9mo ago
using web terminal, web vscode or Coder CLI if you can install it in iSH
Phorcys
Phorcys9mo ago
iSH
iSH is a project to get a Linux shell environment running locally on your iOS device, using a usermode x86 emulator.
ajeygore
ajeygore9mo ago
I am using blinkshell. But since I don’t have coder agent on ipad - I am trying to figure out how do i ssh into my workspace
Phorcys
Phorcys9mo ago
GitHub
Release v2.9.0 · coder/coder
Changelog BREAKING CHANGES Remove prometheus-http port declaration from coderd service spec (#12214) (@johnstcn) Provisioners: only allow untagged provisioners to pick up untagged jobs (#12269) (@...
Phorcys
Phorcys9mo ago
get the .tar.gz file for your architecture, probably arm64 or armv7 depending on your device hey @ajeygore, did you figure this out ?
ajeygore
ajeygore8mo ago
Yes, finally I have a solution, I am using incus + coder. Incus provides me with LXC containers, they mostly behave like VMs, so that’s great, then I am using incus + docker template, so instead of docker in docker, I am using LXC + Docker. Given that, I can use tailscale vpn to get direct access to LXC containers and thus I can login from my iPad directly without coder cli., This is a good solution, For now. There should be a way to directly access my workstation over ssh (people like me who love to work on ssh) but without any cli installation, or if I want to share my machine’s ssh to someone and then can share the screen using tmux 🙂
Want results from more Discord servers?
Add your server