From nobody Thu Apr 06 09:54:35 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PscL60831z446Rj for ; Thu, 6 Apr 2023 09:54:54 +0000 (UTC) (envelope-from bounce.xluvt3od30=l7nces3g76yk=afmmrrd2hb@em773646.vernuftiger.nl) Received: from e2i954.smtp2go.com (e2i954.smtp2go.com [103.2.143.186]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PscL43JXHz419y for ; Thu, 6 Apr 2023 09:54:51 +0000 (UTC) (envelope-from bounce.xluvt3od30=l7nces3g76yk=afmmrrd2hb@em773646.vernuftiger.nl) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=smtpservice.net header.s=a1-4 header.b=2Rzf3sF1; dkim=pass header.d=vernuftiger.nl header.s=s773646 header.b=d77hoXtF; spf=pass (mx1.freebsd.org: domain of "bounce.xluvt3od30=l7nces3g76yk=afmmrrd2hb@em773646.vernuftiger.nl" designates 103.2.143.186 as permitted sender) smtp.mailfrom="bounce.xluvt3od30=l7nces3g76yk=afmmrrd2hb@em773646.vernuftiger.nl"; dmarc=none Received: from [10.87.208.57] (helo=mail.pub.vernuftiger.nl) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96-S2G) (envelope-from ) id 1pkMKG-g372lY-2F for questions@freebsd.org; Thu, 06 Apr 2023 09:54:40 +0000 Received: from mail.vernuftiger.nl (localhost [127.0.0.1]) by mail.pub.vernuftiger.nl (Postfix) with SMTP id CAE229567F9 for ; Thu, 6 Apr 2023 11:54:36 +0200 (CEST) Received: (qmail 40184 invoked from network); 6 Apr 2023 09:54:35 -0000 Received: from unknown (HELO ?192.168.111.24?) (192.168.111.24) by mail.vernuftiger.nl with SMTP; 6 Apr 2023 09:54:35 -0000 Message-ID: <69f0dac5-7cc2-0114-17b9-5b5c7f40a2b4@vernuftiger.nl> Date: Thu, 6 Apr 2023 11:54:35 +0200 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: sshd (base system) and openssh portable (ports) on different ports disables other Content-Language: en-US To: questions@freebsd.org References: <08927381-e37c-0ec6-2b9e-25241cf38dd9@vernuftiger.nl> <00e5dfc2-702b-4838-ba55-49794e20152e@FreeBSD.org> From: ICT builder In-Reply-To: <00e5dfc2-702b-4838-ba55-49794e20152e@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-smtpcorp-track: 1pkuKGg372_Y2F.LkPhJVMIGPpNE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smtpservice.net; i=@smtpservice.net; q=dns/txt; s=a1-4; t=1680774888; h=feedback-id : x-smtpcorp-track : date : message-id : to : subject : from : reply-to : sender : list-unsubscribe; bh=wPBvS5ndTLU5mbHGZBvgm8kjoSV0s0MGWMTVDMJx85c=; b=2Rzf3sF1fSIGUkzU/Hbg679A3XiTpEu6EAlNYo+n65JYQFofrKCZzPZ8Zaxo4263SDUdB 3xGL84cCWF7w6e4xmMEuA5DoczaV+klqJJDmpjjau9S9QmPIwLU4tmODbyiOVzlvETUOWpv k3ULWZWVrvixnKEkna4LWWE6Far1w7GPsKO4KbtXtnLokv9TLKYBUaJ7D21Si5GFv3cPT6u eNHlPL9qMh5edpK1u2mU9Rr/PLxdwJipH18XJYu54YFy7jviRyCqhB/gvPpOC5R7R8z9A8o 7c+PXUCS8zpepzNEn8/XpjYJ9CWAtBYB58qoKEWYiMhIirfnBR5U+gSgGppA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vernuftiger.nl; i=@vernuftiger.nl; q=dns/txt; s=s773646; t=1680774888; h=from : subject : to : message-id : date; bh=wPBvS5ndTLU5mbHGZBvgm8kjoSV0s0MGWMTVDMJx85c=; b=d77hoXtFnwvn//NeHSQme3fXd9M8TBD9mwwhmE8F1uYSg+3ouvXYbZFx6kUJaIO5toTFP uySZ+ZaeBNcZdqX6UKzrLJxAUZyxvoSrEKJkhWqqo+P5EnImBVYrEV8l9D/EsNk41OAphXU WvSHht3X1W14ZcCjSGZLB1kCYRxNUUSLM42oM3qZctMdTk38P9evVGDAl83yOicMbsDItx8 T3wVXGX/hLlaC54bAIE0eoWZllA8fVnZcDDoAvl6fLN13D0D0tWL8n6sJHkMNi9yvKcw/m7 SSMMAInHjD9oR+04nHyH46t3gKvnFbtqaYEVaNmxUqRb+qyoB5kQfQkwu8bQ== X-Spamd-Result: default: False [-3.19 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.988]; FORGED_SENDER(0.30)[builder@vernuftiger.nl,bounce.xluvt3od30=l7nces3g76yk=afmmrrd2hb@em773646.vernuftiger.nl]; R_SPF_ALLOW(-0.20)[+ip4:103.2.140.0/22]; R_DKIM_ALLOW(-0.20)[smtpservice.net:s=a1-4,vernuftiger.nl:s=s773646]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:23352, ipnet:103.2.140.0/22, country:US]; MLMMJ_DEST(0.00)[questions@freebsd.org]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[smtpservice.net:+,vernuftiger.nl:+]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[vernuftiger.nl]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_NEQ_ENVFROM(0.00)[builder@vernuftiger.nl,bounce.xluvt3od30=l7nces3g76yk=afmmrrd2hb@em773646.vernuftiger.nl]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4PscL43JXHz419y X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 06-04-2023 08:56, Matthew Seaman wrote: > On 06/04/2023 01:21, ICT builder wrote: > >> Im trying to setup (in a jail) sshd from base system on port 22, this >> works. >> >> For remote sftp I added openssh portable trough ports and set it up on >> a different port. >> >> Goal is to run both at same time but as soon as i start or restart >> openssh portable port 22 sshd base system gets closed. >> >> Once I restart base sshd port 22 is back but then the port set for >> openssh portable gets closed. >> >> Goggling didn't turn up anything useful so I hope someone here can >> tell me how I can run both ssh servers (on different ports) at the >> same time. > The startup scripts for openssh go to great lengths to check that base > system sshd and openssh aren't configured to listen on the same ports or > listen addresses.  However it seems that both variants default to using > the same /var/run/sshd.pid for their pidfile.  Unless you override that > from your openssh config and set $openssh_pidfile appropriately in > rc.conf that's going to cause problems, since the rc script for one will > end up sending signals to the other process. [snip great extra info] Thanks for taking the time to answer this (and explaining more). with a openssh_pidfile entry in rc.conf it works as aspected. Much apreciated.