Re: sshd (base system) and openssh portable (ports) on different ports disables other
Date: Thu, 06 Apr 2023 09:54:35 UTC
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.