Starting the sshd service on a 'non-bash' system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

I was wondering whether anybody has any experience of running the sshd service successfully on a system with a 'non-bash' shell?

We're using systemd 250.5 and openssh 8.9p1. Both ssh and scp work as expected with '/bin/sh -> bash.bash' on the target, but with '/bin/sh -> busybox.nosuid' (ash shell) the connections fail.

The sshd logs on the target show:
Jul 31 15:24:56 hc sshd[17826]: Connection from UNKNOWN port 65535 on 192.168.12.246 port 65535
Jul 31 15:24:56 hc sshd[17826]: debug1: kex_exchange_identification: write: Broken pipe
Jul 31 15:24:56 hc sshd[17826]: banner exchange: Connection from UNKNOWN port 65535: Broken pipe

Some extra debug messages that I've added to both systemd and sshd show that the incoming socket gets closed somewhere between the handover from the systemd socket service to the systemd sshd service. This results in sshd being unable to get any peer details. The call to getpeername in service_spawn fails with ENOTCONN.

I can't see anything obvious in either the systemd source that suggests a dependency on bash.

Any ideas gratefully appreciated.

Regards

Mark

--

Mark Corbin
Senior Software Engineer  |   lunarenergy.com   |  LinkedIn  |  Instagram
Lunar Energy Logo

C2:Restricted unless otherwise stated.

Lunar Energy Limited is a company registered in England and Wales, authorised and regulated by the Financial Conduct Authority under reference number 767876. Company registration number: 05631091. Registered office: 55 Baker Street, London, England, W1U 7EU


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux