34c3f919dc
fix(agent/agentssh): check for hushlogin via afero fs ( #8358 )
2023-07-07 13:30:23 +03:00
3f058f28e7
test(agent): use afero for motd tests to allow parallel execution ( #8329 )
2023-07-06 10:57:51 +03:00
6015319e9d
feat: show service banner in SSH/TTY sessions ( #8186 )
...
* Allow workspace agents to get appearance
* Poll for service banner every two minutes
* Show service banner before MOTD if not quiet
2023-06-30 10:41:29 -08:00
e738123a9c
chore: log ssh connection disconnects with errors ( #8143 )
...
Signed-off-by: Spike Curtis <spike@coder.com >
2023-06-22 11:37:50 +04:00
4fb4c9b270
chore: add more rules to ensure logs consistency ( #8104 )
2023-06-21 12:00:38 +02:00
1c8f564fdb
feat: add logging of ssh connections to agent ( #8096 )
...
* feat: adds logging of ssh connections to agent
Signed-off-by: Spike Curtis <spike@coder.com >
* code review improvements
Signed-off-by: Spike Curtis <spike@coder.com >
---------
Signed-off-by: Spike Curtis <spike@coder.com >
2023-06-21 13:49:58 +04:00
b1d1b63113
chore: ensure logs consistency across Coder ( #8083 )
2023-06-20 12:30:45 +02:00
247f8a973f
feat: replace ssh maxTimeout with keep-alive mechanism ( #8062 )
...
* Bump up coder/ssh
* feat: Set default agent timeout to ~72h
* Address PR comments
* Fix
2023-06-16 15:22:18 +02:00
74fdcb1ace
fix(agent/agentssh): wait for sessions to exit ( #8008 )
2023-06-13 17:52:31 +00:00
14efdadd3c
feat: Collect agent SSH metrics ( #7584 )
2023-05-25 12:52:36 +02:00
9c030a8888
fix: pty.Start respects context on Windows too ( #7373 )
...
* fix: pty.Start respects context on Windows too
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix windows imports; rename ToExec -> AsExec
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix import in windows test
Signed-off-by: Spike Curtis <spike@coder.com >
---------
Signed-off-by: Spike Curtis <spike@coder.com >
2023-05-03 11:43:05 +04:00
daee91c6dc
refactor: PTY & SSH ( #7100 )
...
* Add ssh tests for longoutput, orphan
Signed-off-by: Spike Curtis <spike@coder.com >
* PTY/SSH tests & improvements
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix some tests
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix linting
Signed-off-by: Spike Curtis <spike@coder.com >
* fmt
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix windows test
Signed-off-by: Spike Curtis <spike@coder.com >
* Windows copy test
Signed-off-by: Spike Curtis <spike@coder.com >
* WIP Windows pty handling
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix truncation tests
Signed-off-by: Spike Curtis <spike@coder.com >
* Appease linter/fmt
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix typo
Signed-off-by: Spike Curtis <spike@coder.com >
* Rework truncation test to not assume OS buffers
Signed-off-by: Spike Curtis <spike@coder.com >
* Disable orphan test on Windows --- uses sh
Signed-off-by: Spike Curtis <spike@coder.com >
* agent_test running SSH in pty use ptytest.Start
Signed-off-by: Spike Curtis <spike@coder.com >
* More detail about closing pseudoconsole on windows
Signed-off-by: Spike Curtis <spike@coder.com >
* Code review fixes
Signed-off-by: Spike Curtis <spike@coder.com >
* Rearrange ptytest method order
Signed-off-by: Spike Curtis <spike@coder.com >
* Protect pty.Resize on windows from races
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix windows bugs
Signed-off-by: Spike Curtis <spike@coder.com >
* PTY doesn't extend PTYCmd
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix windows types
Signed-off-by: Spike Curtis <spike@coder.com >
---------
Signed-off-by: Spike Curtis <spike@coder.com >
2023-04-24 14:53:57 +04:00
fd84df769d
fix: add DISPLAY
env var for X11 connections ( #7248 )
...
* fix: add `DISPLAY` env var for X11 connections
* Update agent/agentssh/agentssh.go
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com >
---------
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com >
2023-04-21 16:43:49 +00:00
f39e6a79de
feat: add support for X11 forwarding ( #7205 )
...
* feat: add support for X11 forwarding
* Only run X forwarding on Linux
* Fix piping
* Fix comments
2023-04-21 15:52:40 +00:00
aa660e0631
feat(agentssh): Gracefully close SSH sessions on Close ( #7027 )
...
By tracking and closing sessions manually before closing the underlying
connections, we ensure that the termination is propagated to SSH/SFTP
clients and they're not left waiting for a connection timeout.
Refs: #6177
2023-04-06 19:57:30 +03:00
0224426e5b
refactor(agent): Move SSH server into agentssh package ( #7004 )
...
Refs: #6177
2023-04-06 19:39:22 +03:00