Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Apr 2023 11:54:35 +0200
From:      ICT builder <builder@vernuftiger.nl>
To:        questions@freebsd.org
Subject:   Re: sshd (base system) and openssh portable (ports) on different ports disables other
Message-ID:  <69f0dac5-7cc2-0114-17b9-5b5c7f40a2b4@vernuftiger.nl>
In-Reply-To: <00e5dfc2-702b-4838-ba55-49794e20152e@FreeBSD.org>
References:  <08927381-e37c-0ec6-2b9e-25241cf38dd9@vernuftiger.nl> <00e5dfc2-702b-4838-ba55-49794e20152e@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f0dac5-7cc2-0114-17b9-5b5c7f40a2b4>