From 3f2bec5f64a802b311af12c3e9061d89985e78ac Mon Sep 17 00:00:00 2001 From: Percy Wegmann Date: Wed, 5 Feb 2025 12:01:01 -0600 Subject: [PATCH] ssh: don't use -l option for shells on OpenBSD Shells on OpenBSD don't support the -l option. This means that when handling SSH in-process, we can't give the user a login shell, but this change at least allows connecting at all. Updates #13338 Signed-off-by: Percy Wegmann --- ssh/tailssh/incubator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssh/tailssh/incubator.go b/ssh/tailssh/incubator.go index f55dcbe45..e809e9185 100644 --- a/ssh/tailssh/incubator.go +++ b/ssh/tailssh/incubator.go @@ -1096,8 +1096,8 @@ func (ia *incubatorArgs) loginArgs(loginCmdPath string) []string { func shellArgs(isShell bool, cmd string) []string { if isShell { - if runtime.GOOS == freebsd { - // freebsd's shells don't support the "-l" option, so we can't run as a login shell + if runtime.GOOS == freebsd || runtime.GOOS == openbsd { + // bsd shells don't support the "-l" option, so we can't run as a login shell return []string{} } return []string{"-l"}