[
https://issues.apache.org/jira/browse/SSHD-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17456693#comment-17456693
]
Jörg Weule commented on SSHD-1232:
----------------------------------
With the following files systemd binds a socket to a port and starts a service
on the first incomming connection. The service will get the socket to accept
the connections with System.inheretedChannel() from stdin.
cat <<! >~/.config/systemd/user/foo.service
[Unit]
Description=foo.service
After=network.target foo.socket
Requires=foo.socket
[Service]
Type=simple
WorkingDirectory=/opt/foo
ExecStart=/opt/foo/bin/foo-application
#TimeoutStopSec=200
StandardInput=socket
StandardOutput=syslog
StandardError=syslog
[Install]
WantedBy=default.target
!
cat <<! >~/.config/systemd/user/foo.socket
[Unit]
Description=foo socket
PartOf=foo.service
[Socket]
ListenStream=127.0.0.1:8102
Accept=false
[Install]
WantedBy=sockets.target
!
I would like to start my own small shell at the incoming connection.
Why can't I start the ssh-server with an already bound socket to accept and
handle all the incoming connections and shut down if there is no connection for
a while.
> Use of System.inheritedChannel
> ------------------------------
>
> Key: SSHD-1232
> URL: https://issues.apache.org/jira/browse/SSHD-1232
> Project: MINA SSHD
> Issue Type: Improvement
> Affects Versions: 2.9.0
> Reporter: Jörg Weule
> Priority: Minor
>
> System.inheritedChannel should be a possible channel for sshServer.
> The cannel can be opened by systemd, waiting for a connection and then
> starting the service.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]