5956 Commits
Author SHA1 Message Date
Nicolas Viennot 1f314123df Check active_pane_id for validity
Suggested by Matthias Gerstner
2021-10-17 17:07:09 -04:00
Nicolas Viennot b41672b634 Limit the number of panes to 1000 per client
Suggested by Matthias Gerstner
2021-10-17 17:07:07 -04:00
Nicolas Viennot 36f073b4cc Limit incoming message size
Suggested by Matthias Gerstner
2021-10-17 17:07:04 -04:00
Nicolas Viennot 1c020d1f5c Harden /tmp/tmate directory
Suggested by Matthias Gerstner
2021-10-17 17:06:49 -04:00
Nicolas Viennot 9dd7f0779e fix error message 2021-10-17 17:06:04 -04:00
Felix Yan befd49f4e8 Correct a typo in window.c (#91) 2021-08-16 11:16:22 -04:00
Gilles Filippini 511fd2bd85 Docker: add variable WEBSOCKET_HOSTNAME
To use when the websocket isn't on the same host.

This is needed for docker-compose settings where the ssh server and the
websocket are on two separate services.

Mutualy exclusive with `HAS_WEBSOCKET=1` which is the same as
`WEBSOCKET_HOSTNAME=localhost`.
2021-03-21 13:57:32 -04:00
Bjoern Jacke fb373b6c2f server: set IPTOS_LOWDELAY in TCP connections
this helps edge routers to prioritize our interactive network traffic.
2021-02-20 19:43:52 -05:00
Florian Klink afd81e9521 create_keys.sh: address shellcheck issues 2021-02-03 10:07:07 +01:00
Florian Klink a693c27ef4 create_keys.sh: use #/usr/bin/env bash
That way, this can run when `bash` is in $PATH, which works for
distributions where it's not in /bin, like on NixOS.
2021-02-03 10:06:29 +01:00
Andreas Schneider 1d0743c5d5 Dockerfile: Install libssh 0.9.5 from Alpine Linux 2021-01-21 08:05:11 +01:00
Andreas Schneider ae28014643 Dockerfile: Update Alpine Linux to version 3.13 2021-01-21 08:05:11 +01:00
Sergio Borghese d7a7c271dc Update docker-entrypoint.sh
fix operator error
```
./start-tmate-ssh-server: 10: [: 1: unexpected operator
./start-tmate-ssh-server: 14: [: 1: unexpected operator
```
2021-01-20 16:50:38 +01:00
Andreas Schneider 43b390b704 Dockerfile: Use libssh 0.9.5 2021-01-20 16:44:10 +01:00
Anderson Sasaki 97d20249be Explicitly parse config to avoid options override (#74)
Since libssh 0.9.0 the global server configuration file is automatically
parsed when new connections are accepted, unless
ssh_bind_options_parse_config() is explicitly called or the automatic
parsing is disabled by setting the SSH_BIND_OPTIONS_PROCESS_CONFIG
option with false.

This adds an explicit call to ssh_bind_options_parse_config() before
setting the options to avoid them to be overridden.

Fixes #72

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
2020-04-27 19:54:26 -04:00
Klemens Nanni f0c32a14a4 Include missing <signal.h>
At least on OpenBSD, signal(3) requires this.
2020-04-14 18:13:49 -04:00
Klemens Nanni 54ea774265 Fix libssh set_options_set() usage
SSH_OPTIONS_TIMEOUT requires a long value as per upstream documentation.

Pointing to an integer instead causes it to crash with SIBGUS on
OpenBSD/sparc64.
2020-04-14 18:13:35 -04:00
Nicolas Viennot cb4c7a874d Quotes can be a bad idea (utf8 quotes) 2020-04-14 18:07:21 -04:00
Nicolas Viennot 43214648f2 Forgot the letter i in the valid_digits 2019-11-17 18:44:59 -05:00
Nicolas Viennot e1a5e08471 Rename account-key -> api-key 2019-11-10 22:28:08 -05:00
Nicolas Viennot ecc15f6022 Unify tmate-debug.c with tmate 2019-11-10 15:52:31 -05:00
Nicolas Viennot f132989294 nits 2019-11-10 15:52:31 -05:00
Nicolas Viennot 90c3b571d3 Log uname 2019-11-10 15:52:31 -05:00
Nicolas Viennot 1d26957b3b Incoming messages should be dispatched first before being forwarded
It's a cheap sanity check
2019-11-09 23:28:07 -05:00
Nicolas Viennot b97f8dc7d6 Cleanup logging 2019-11-09 23:28:07 -05:00
Nicolas Viennot 7f26d860b5 Cleanup warnings 2019-11-08 23:54:36 -05:00
Nicolas Viennot 975f60d2ac Rename TMATE_SLAVE -> TMATE 2019-11-08 23:54:36 -05:00
Nicolas Viennot 4b79571357 Display warnings when trying to use named sessions without the websocket server 2019-11-08 23:54:36 -05:00
Nicolas Viennot 6c41248dad Be more persmissive for session tokens (useful for named sessions) 2019-11-08 23:54:36 -05:00
Nicolas Viennot 7c1bc239af Shorten connection grace period to 20s 2019-11-07 13:18:25 -05:00
Nicolas Viennot e71bd675b5 Allow tmate daemon to specify a list of authorized SSH keys 2019-11-07 13:18:25 -05:00
Nicolas Viennot 48884c95c9 Take out the -a authorized_keys option 2019-11-07 08:03:38 -05:00
Nicolas Viennot cd3ee3ee4d Refactor code 2019-11-07 08:01:49 -05:00
Nicolas Viennot 6a951aa9f7 Improve debugging traces 2019-11-06 16:45:18 -05:00
Nicolas Viennot 975ba3323b Fix bug of SIG unset if the keys already exists
Fixes #66
2019-10-31 20:45:19 -04:00
Nicolas Viennot 566a8bc412 Show better explaination of invalid session tokens 2019-10-22 05:22:58 -04:00
Nicolas Viennot dc05cbc4f5 Allow non authentication method for SSH 2019-10-15 03:36:15 -04:00
Nicolas Viennot 48b5c6afba readme notes 2019-10-14 23:21:11 -04:00
Nicolas Viennot 383b69f04c Take out some annoying letters to speak over the phone
Session key entropy goes from 149 to 144 bits. It's acceptable

Fixes #31
2019-10-13 05:23:45 -04:00
Nicolas Viennot fde93450dc Add readme for the docker image 2019-10-13 05:01:11 -04:00
Nicolas Viennot eb08daec79 README is todo 2019-10-13 02:54:29 -04:00
Nicolas Viennot 314bf91299 Remove latency measurements 2019-10-09 18:59:38 -04:00
Nicolas Viennot 9c3cc0e264 Renable keepalive now that libssh allows it 2019-10-09 18:47:01 -04:00
Nicolas Viennot 5c2c1c2584 logging improvement 2019-10-09 17:36:23 -04:00
Nicolas Viennot 2bd232c982 Avoid disconnection warning if fin packet is received 2019-10-05 04:11:32 -04:00
Nicolas Viennot 9df2e6d6fb nits 2019-09-18 23:03:55 -04:00
Nicolas Viennot 6c5497df4b Only load keys that are accessible 2019-08-31 23:42:21 -04:00
Nicolas Viennot 07dc84de98 avoid logging early failures 2019-08-31 22:09:19 -04:00
Nicolas Viennot 7f9378de43 Allow to advertize a specific SSH port (for load balancer) 2019-08-31 18:52:35 -04:00
Nicolas Viennot 080be74a75 Hide session token in ps and logs 2019-08-31 17:35:34 -04:00