sysutils/tmate-slave: update to new snapshot
While here, add support for newer key types and specify ciphers and fix minor bug
This commit is contained in:
parent
3362081a6e
commit
65a460200a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=491907
@ -1,7 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= tmate-slave
|
||||
PORTVERSION= g20171113
|
||||
PORTVERSION= g2018112801
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= sysutils
|
||||
|
||||
@ -15,7 +15,7 @@ LIB_DEPENDS= libevent.so:devel/libevent \
|
||||
USES= autoreconf ncurses pkgconfig
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= tmate-io
|
||||
GH_TAGNAME= d6a76e0
|
||||
GH_TAGNAME= 8b294f3
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
INSTALL_ARGET= install-strip
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1531322562
|
||||
SHA256 (tmate-io-tmate-slave-g20171113-d6a76e0_GH0.tar.gz) = ea6fe8658409b8c619ef2e42ff850cff21a6ea5960ffed0b3857c1821f0828d4
|
||||
SIZE (tmate-io-tmate-slave-g20171113-d6a76e0_GH0.tar.gz) = 619263
|
||||
TIMESTAMP = 1543425417
|
||||
SHA256 (tmate-io-tmate-slave-g2018112801-8b294f3_GH0.tar.gz) = f979f8de40a5f0393402dba6ec7c230253e2c5711846aeb45c3862772ed5fd06
|
||||
SIZE (tmate-io-tmate-slave-g2018112801-8b294f3_GH0.tar.gz) = 620261
|
||||
|
15
sysutils/tmate-slave/files/patch-tmate-daemon-decoder.c
Normal file
15
sysutils/tmate-slave/files/patch-tmate-daemon-decoder.c
Normal file
@ -0,0 +1,15 @@
|
||||
--- tmate-daemon-decoder.c.orig 2019-02-01 22:30:53 UTC
|
||||
+++ tmate-daemon-decoder.c
|
||||
@@ -39,11 +39,11 @@ static void tmate_header(struct tmate_session *session
|
||||
|
||||
tmate_notify("Note: clear your terminal before sharing readonly access");
|
||||
tmate_notify("ssh session read only: %s", tmp);
|
||||
+ tmate_set_env("tmate_ssh_ro", tmp);
|
||||
|
||||
sprintf(tmp, "ssh%s %s@%s", port_arg, session->session_token, tmate_settings->tmate_host);
|
||||
tmate_notify("ssh session: %s", tmp);
|
||||
|
||||
- tmate_set_env("tmate_ssh_ro", tmp);
|
||||
tmate_set_env("tmate_ssh", tmp);
|
||||
|
||||
tmate_send_client_ready();
|
@ -1,6 +1,6 @@
|
||||
--- tmate-ssh-server.c.orig 2016-04-26 08:05:24 UTC
|
||||
--- tmate-ssh-server.c.orig 2018-11-19 02:28:35 UTC
|
||||
+++ tmate-ssh-server.c
|
||||
@@ -7,6 +7,8 @@
|
||||
@@ -8,6 +8,8 @@
|
||||
#include <stdio.h>
|
||||
#include <event.h>
|
||||
#include <arpa/inet.h>
|
||||
@ -9,3 +9,43 @@
|
||||
|
||||
#include "tmate.h"
|
||||
|
||||
@@ -252,6 +254,10 @@ static void client_bootstrap(struct tmate_session *_se
|
||||
|
||||
ssh_options_set(session, SSH_OPTIONS_TIMEOUT, &grace_period);
|
||||
ssh_options_set(session, SSH_OPTIONS_COMPRESSION, "yes");
|
||||
+ ssh_options_set(session, SSH_OPTIONS_KEY_EXCHANGE, "curve25519-sha256@libssh.org,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512");
|
||||
+ ssh_options_set(session, SSH_OPTIONS_CIPHERS_C_S, "aes256-gcm@openssh.com,aes128-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr");
|
||||
+ ssh_options_set(session, SSH_OPTIONS_CIPHERS_S_C, "aes256-gcm@openssh.com,aes128-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr");
|
||||
+ ssh_options_set(session, SSH_OPTIONS_HOSTKEYS, "ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,ssh-rsa");
|
||||
|
||||
ssh_set_auth_methods(client->session, SSH_AUTH_METHOD_PUBLICKEY);
|
||||
|
||||
@@ -323,6 +329,9 @@ static ssh_bind prepare_ssh(const char *keys_dir, cons
|
||||
ssh_bind bind;
|
||||
char buffer[PATH_MAX];
|
||||
int ssh_log_level;
|
||||
+ ssh_key rsakey = NULL;
|
||||
+ ssh_key ecdsakey = NULL;
|
||||
+ ssh_key ed25519key = NULL;
|
||||
|
||||
ssh_log_level = SSH_LOG_WARNING + max(log_get_level() - LOG_NOTICE, 0);
|
||||
|
||||
@@ -339,10 +348,16 @@ static ssh_bind prepare_ssh(const char *keys_dir, cons
|
||||
ssh_bind_options_set(bind, SSH_BIND_OPTIONS_LOG_VERBOSITY, &ssh_log_level);
|
||||
|
||||
sprintf(buffer, "%s/ssh_host_rsa_key", keys_dir);
|
||||
- ssh_bind_options_set(bind, SSH_BIND_OPTIONS_RSAKEY, buffer);
|
||||
+ ssh_pki_import_privkey_file(buffer, NULL, NULL, NULL, &rsakey);
|
||||
+ ssh_bind_options_set(bind, SSH_BIND_OPTIONS_IMPORT_KEY, rsakey);
|
||||
|
||||
+ sprintf(buffer, "%s/ssh_host_ed25519_key", keys_dir);
|
||||
+ ssh_pki_import_privkey_file(buffer, NULL, NULL, NULL, &ed25519key);
|
||||
+ ssh_bind_options_set(bind, SSH_BIND_OPTIONS_IMPORT_KEY, ed25519key);
|
||||
+
|
||||
sprintf(buffer, "%s/ssh_host_ecdsa_key", keys_dir);
|
||||
- ssh_bind_options_set(bind, SSH_BIND_OPTIONS_ECDSAKEY, buffer);
|
||||
+ ssh_pki_import_privkey_file(buffer, NULL, NULL, NULL, &ecdsakey);
|
||||
+ ssh_bind_options_set(bind, SSH_BIND_OPTIONS_IMPORT_KEY, ecdsakey);
|
||||
|
||||
if (ssh_bind_listen(bind) < 0)
|
||||
tmate_fatal("Error listening to socket: %s\n", ssh_get_error(bind));
|
||||
|
Loading…
Reference in New Issue
Block a user