From ff9d6c2a4171ee32e8fe28fc3b86eb33bd5c845b Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 14 Sep 2013 09:48:55 +1000 Subject: - sthen@cvs.openbsd.org 2013/09/07 13:53:11 [sshd_config] Remove commented-out kerberos/gssapi config options from sample config, kerberos support is currently not enabled in ssh in OpenBSD. Discussed with various people; ok deraadt@ ID SYNC ONLY for portable; kerberos/gssapi is still pretty popular --- sshd_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sshd_config') diff --git a/sshd_config b/sshd_config index b786361d1..8d8eeea34 100644 --- a/sshd_config +++ b/sshd_config @@ -1,4 +1,4 @@ -# $OpenBSD: sshd_config,v 1.90 2013/05/16 04:09:14 dtucker Exp $ +# $OpenBSD: sshd_config,v 1.91 2013/09/07 13:53:11 sthen Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. -- cgit v1.2.3 From e90a06ae570fd259a2f5ced873c7f17390f535a5 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Wed, 18 Sep 2013 15:09:38 +1000 Subject: - (dtucker) [sshd_config] Trailing whitespace; from jstjohn at purdue edu. --- ChangeLog | 3 +++ sshd_config | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'sshd_config') diff --git a/ChangeLog b/ChangeLog index 57721f8d8..df8249779 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +20130918 + - (dtucker) [sshd_config] Trailing whitespace; from jstjohn at purdue edu. + 20130914 - (djm) OpenBSD CVS Sync - djm@cvs.openbsd.org 2013/08/22 19:02:21 diff --git a/sshd_config b/sshd_config index 8d8eeea34..dbda7491e 100644 --- a/sshd_config +++ b/sshd_config @@ -84,8 +84,8 @@ AuthorizedKeysFile .ssh/authorized_keys #GSSAPIAuthentication no #GSSAPICleanupCredentials yes -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will +# Set this to 'yes' to enable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will # be allowed through the ChallengeResponseAuthentication and # PasswordAuthentication. Depending on your PAM configuration, # PAM authentication via ChallengeResponseAuthentication may bypass -- cgit v1.2.3 From 5ff30c6b68adeee767dd29bf2369763c6a13c0b3 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 30 Oct 2013 22:21:50 +1100 Subject: - djm@cvs.openbsd.org 2013/10/29 09:48:02 [servconf.c servconf.h session.c sshd_config sshd_config.5] shd_config PermitTTY to disallow TTY allocation, mirroring the longstanding no-pty authorized_keys option; bz#2070, patch from Teran McKinney; ok markus@ --- ChangeLog | 5 +++++ servconf.c | 14 ++++++++++++-- servconf.h | 3 ++- session.c | 4 ++-- sshd_config | 4 +++- sshd_config.5 | 11 +++++++++-- 6 files changed, 33 insertions(+), 8 deletions(-) (limited to 'sshd_config') diff --git a/ChangeLog b/ChangeLog index 54f7b0042..84283a3e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,11 @@ [key.c key.h] fix potential stack exhaustion caused by nested certificates; report by Mateusz Kocielski; ok dtucker@ markus@ + - djm@cvs.openbsd.org 2013/10/29 09:48:02 + [servconf.c servconf.h session.c sshd_config sshd_config.5] + shd_config PermitTTY to disallow TTY allocation, mirroring the + longstanding no-pty authorized_keys option; + bz#2070, patch from Teran McKinney; ok markus@ 20131026 - (djm) OpenBSD CVS Sync diff --git a/servconf.c b/servconf.c index 82146723f..0f1bdd09a 100644 --- a/servconf.c +++ b/servconf.c @@ -1,5 +1,5 @@ -/* $OpenBSD: servconf.c,v 1.243 2013/10/24 00:51:48 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.244 2013/10/29 09:48:02 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -92,6 +92,7 @@ initialize_server_options(ServerOptions *options) options->x11_forwarding = -1; options->x11_display_offset = -1; options->x11_use_localhost = -1; + options->permit_tty = -1; options->xauth_location = NULL; options->strict_modes = -1; options->tcp_keep_alive = -1; @@ -212,6 +213,8 @@ fill_default_server_options(ServerOptions *options) options->x11_use_localhost = 1; if (options->xauth_location == NULL) options->xauth_location = _PATH_XAUTH; + if (options->permit_tty == -1) + options->permit_tty = 1; if (options->strict_modes == -1) options->strict_modes = 1; if (options->tcp_keep_alive == -1) @@ -329,7 +332,7 @@ typedef enum { sListenAddress, sAddressFamily, sPrintMotd, sPrintLastLog, sIgnoreRhosts, sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost, - sStrictModes, sEmptyPasswd, sTCPKeepAlive, + sPermitTTY, sStrictModes, sEmptyPasswd, sTCPKeepAlive, sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression, sRekeyLimit, sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, @@ -462,6 +465,7 @@ static struct { { "useprivilegeseparation", sUsePrivilegeSeparation, SSHCFG_GLOBAL}, { "acceptenv", sAcceptEnv, SSHCFG_ALL }, { "permittunnel", sPermitTunnel, SSHCFG_ALL }, + { "permittty", sPermitTTY, SSHCFG_ALL }, { "match", sMatch, SSHCFG_ALL }, { "permitopen", sPermitOpen, SSHCFG_ALL }, { "forcecommand", sForceCommand, SSHCFG_ALL }, @@ -1132,6 +1136,10 @@ process_server_config_line(ServerOptions *options, char *line, charptr = &options->xauth_location; goto parse_filename; + case sPermitTTY: + intptr = &options->permit_tty; + goto parse_flag; + case sStrictModes: intptr = &options->strict_modes; goto parse_flag; @@ -1783,6 +1791,7 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth) M_CP_INTOPT(x11_display_offset); M_CP_INTOPT(x11_forwarding); M_CP_INTOPT(x11_use_localhost); + M_CP_INTOPT(permit_tty); M_CP_INTOPT(max_sessions); M_CP_INTOPT(max_authtries); M_CP_INTOPT(ip_qos_interactive); @@ -2013,6 +2022,7 @@ dump_config(ServerOptions *o) dump_cfg_fmtint(sPrintLastLog, o->print_lastlog); dump_cfg_fmtint(sX11Forwarding, o->x11_forwarding); dump_cfg_fmtint(sX11UseLocalhost, o->x11_use_localhost); + dump_cfg_fmtint(sPermitTTY, o->permit_tty); dump_cfg_fmtint(sStrictModes, o->strict_modes); dump_cfg_fmtint(sTCPKeepAlive, o->tcp_keep_alive); dump_cfg_fmtint(sEmptyPasswd, o->permit_empty_passwd); diff --git a/servconf.h b/servconf.h index 98aad8ba2..2d4b6ecb4 100644 --- a/servconf.h +++ b/servconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.h,v 1.109 2013/07/19 07:37:48 markus Exp $ */ +/* $OpenBSD: servconf.h,v 1.110 2013/10/29 09:48:02 djm Exp $ */ /* * Author: Tatu Ylonen @@ -82,6 +82,7 @@ typedef struct { * searching at */ int x11_use_localhost; /* If true, use localhost for fake X11 server. */ char *xauth_location; /* Location of xauth program */ + int permit_tty; /* If false, deny pty allocation */ int strict_modes; /* If true, require string home dir modes. */ int tcp_keep_alive; /* If true, set SO_KEEPALIVE. */ int ip_qos_interactive; /* IP ToS/DSCP/class for interactive */ diff --git a/session.c b/session.c index 6e48a2fae..a0a0c2d9c 100644 --- a/session.c +++ b/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.267 2013/10/14 21:20:52 djm Exp $ */ +/* $OpenBSD: session.c,v 1.268 2013/10/29 09:48:02 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -2062,7 +2062,7 @@ session_pty_req(Session *s) u_int len; int n_bytes; - if (no_pty_flag) { + if (no_pty_flag || !options.permit_tty) { debug("Allocating a pty not permitted for this authentication."); return 0; } diff --git a/sshd_config b/sshd_config index dbda7491e..235459af0 100644 --- a/sshd_config +++ b/sshd_config @@ -1,4 +1,4 @@ -# $OpenBSD: sshd_config,v 1.91 2013/09/07 13:53:11 sthen Exp $ +# $OpenBSD: sshd_config,v 1.92 2013/10/29 09:48:02 djm Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. @@ -101,6 +101,7 @@ AuthorizedKeysFile .ssh/authorized_keys #X11Forwarding no #X11DisplayOffset 10 #X11UseLocalhost yes +#PermitTTY yes #PrintMotd yes #PrintLastLog yes #TCPKeepAlive yes @@ -127,4 +128,5 @@ Subsystem sftp /usr/libexec/sftp-server #Match User anoncvs # X11Forwarding no # AllowTcpForwarding no +# PermitTTY no # ForceCommand cvs server diff --git a/sshd_config.5 b/sshd_config.5 index 0536cc3c6..c3e30e614 100644 --- a/sshd_config.5 +++ b/sshd_config.5 @@ -33,8 +33,8 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: sshd_config.5,v 1.163 2013/10/24 00:51:48 dtucker Exp $ -.Dd $Mdocdate: October 24 2013 $ +.\" $OpenBSD: sshd_config.5,v 1.164 2013/10/29 09:48:02 djm Exp $ +.Dd $Mdocdate: October 29 2013 $ .Dt SSHD_CONFIG 5 .Os .Sh NAME @@ -813,6 +813,7 @@ Available keywords are .Cm PermitEmptyPasswords , .Cm PermitOpen , .Cm PermitRootLogin , +.Cm PermitTTY , .Cm PermitTunnel , .Cm PubkeyAuthentication , .Cm RekeyLimit , @@ -942,6 +943,12 @@ and .Dq ethernet . The default is .Dq no . +.It Cm PermitTTY +Specifies whether +.Xr pty 7 +allocation is permitted. +The default is +.Dq yes . .It Cm PermitUserEnvironment Specifies whether .Pa ~/.ssh/environment -- cgit v1.2.3 From af5d4481f4c7c8c3c746e68b961bb85ef907800e Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 12 Jan 2014 19:20:47 +1100 Subject: - djm@cvs.openbsd.org 2014/01/10 05:59:19 [sshd_config] the /etc/ssh/ssh_host_ed25519_key is loaded by default too --- ChangeLog | 6 ++++++ sshd_config | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'sshd_config') diff --git a/ChangeLog b/ChangeLog index be7d868bf..99b846e3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +20140112 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/01/10 05:59:19 + [sshd_config] + the /etc/ssh/ssh_host_ed25519_key is loaded by default too + 20140110 - (djm) OpenBSD CVS Sync - tedu@cvs.openbsd.org 2014/01/04 17:50:55 diff --git a/sshd_config b/sshd_config index 235459af0..e9045bc4d 100644 --- a/sshd_config +++ b/sshd_config @@ -1,4 +1,4 @@ -# $OpenBSD: sshd_config,v 1.92 2013/10/29 09:48:02 djm Exp $ +# $OpenBSD: sshd_config,v 1.93 2014/01/10 05:59:19 djm Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. @@ -24,6 +24,7 @@ #HostKey /etc/ssh/ssh_host_rsa_key #HostKey /etc/ssh/ssh_host_dsa_key #HostKey /etc/ssh/ssh_host_ecdsa_key +#HostKey /etc/ssh/ssh_host_ed25519_key # Lifetime and size of ephemeral version 1 server key #KeyRegenerationInterval 1h -- cgit v1.2.3