Debian Codegraph @

upstream/debian-unstable/man8/systemd-ssh-generator.8

raw
1 '\" t
2 .TH "SYSTEMD\-SSH\-GENERATOR" "8" "" "systemd 261~rc3" "systemd-ssh-generator"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 systemd-ssh-generator \- Generator for binding a socket\-activated SSH server to local \fBAF_VSOCK\fR and \fBAF_UNIX\fR sockets
24 .SH "SYNOPSIS"
25 .PP
26 /usr/lib/systemd/system\-generators/systemd\-ssh\-generator
27 .SH "DESCRIPTION"
28 .PP
29 \fBsystemd\-ssh\-generator\fR
30 binds a socket\-activated SSH server to local
31 \fBAF_VSOCK\fR
32 and
33 \fBAF_UNIX\fR
34 sockets under certain conditions\&. It only has an effect if the
35 \fBsshd\fR(8)
36 binary is installed\&. Specifically, it does the following:
37 .sp
38 .RS 4
39 .ie n \{\
40 \h'-04'\(bu\h'+03'\c
41 .\}
42 .el \{\
43 .sp -1
44 .IP \(bu 2.3
45 .\}
46 If invoked in a VM with
47 \fBAF_VSOCK\fR
48 support, a socket\-activated SSH per\-connection service is bound to
49 \fBAF_VSOCK\fR
50 port 22\&.
51 .RE
52 .sp
53 .RS 4
54 .ie n \{\
55 \h'-04'\(bu\h'+03'\c
56 .\}
57 .el \{\
58 .sp -1
59 .IP \(bu 2.3
60 .\}
61 If invoked in a container environment with a writable directory
62 /run/host/unix\-export/
63 pre\-mounted it binds SSH to an
64 \fBAF_UNIX\fR
65 socket
66 /run/host/unix\-export/ssh\&. The assumption is that this directory is bind mounted to the host side as well, and can be used to connect to the container from there\&. See
67 \m[blue]\fBContainer Interface\fR\m[]\&\s-2\u[1]\d\s+2
68 for more information about this interface\&.
69 .RE
70 .sp
71 .RS 4
72 .ie n \{\
73 \h'-04'\(bu\h'+03'\c
74 .\}
75 .el \{\
76 .sp -1
77 .IP \(bu 2.3
78 .\}
79 A local
80 \fBAF_UNIX\fR
81 socket
82 /run/ssh\-unix\-local/socket
83 is also bound, unconditionally\&. This may be used for SSH communication from the host to itself, without involving networking, for example to traverse security boundaries safely and with secure authentication\&.
84 .RE
85 .sp
86 .RS 4
87 .ie n \{\
88 \h'-04'\(bu\h'+03'\c
89 .\}
90 .el \{\
91 .sp -1
92 .IP \(bu 2.3
93 .\}
94 Additional
95 \fBAF_UNIX\fR
96 and
97 \fBAF_VSOCK\fR
98 sockets are optionally bound, based on the
99 \fIsystemd\&.ssh_listen=\fR
100 kernel command line option or the
101 ssh\&.listen
102 system credential (see below)\&.
103 .RE
104 .PP
105 See
106 \fBsystemd-ssh-proxy\fR(1)
107 for details on how to connect to these sockets via the
108 \fBssh\fR
109 client\&.
110 .PP
111 The
112 \fIssh\&.authorized_keys\&.root\fR
113 credential can be used to allow specific public keys to log in over SSH\&. See
114 \fBsystemd.system-credentials\fR(7)
115 for more information\&.
116 .PP
117 The generator will use a packaged
118 sshd@\&.service
119 service template file if one exists, and otherwise generate a suitable service template file\&.
120 .PP
121 \fBsystemd\-ssh\-generator\fR
122 implements
123 \fBsystemd.generator\fR(7)\&.
124 .SH "KERNEL COMMAND LINE"
125 .PP
126 \fBsystemd\-ssh\-generator\fR
127 understands the following
128 \fBkernel-command-line\fR(7)
129 parameters:
130 .PP
131 \fIsystemd\&.ssh_auto=\fR
132 .RS 4
133 This option takes an optional boolean argument, and defaults to yes\&. If enabled, the automatic binding to the
134 \fBAF_VSOCK\fR
135 and
136 \fBAF_UNIX\fR
137 sockets listed above is done\&. If disable, this is not done, except for those explicitly requested via
138 \fIsystemd\&.ssh_listen=\fR
139 on the kernel command line or via the
140 \fIssh\&.listen\fR
141 system credential\&.
142 .sp
143 Added in version 256\&.
144 .RE
145 .PP
146 \fIsystemd\&.ssh_listen=\fR
147 .RS 4
148 This option configures an additional socket to bind SSH to\&. It may be used multiple times to bind multiple sockets\&. The syntax should follow the one of
149 \fIListenStream=\fR, see
150 \fBsystemd.socket\fR(5)
151 for details\&. This functionality supports all socket families
152 \fBsystemd\fR(1)
153 supports, including
154 \fBAF_INET\fR
155 and
156 \fBAF_INET6\fR\&.
157 .sp
158 Added in version 256\&.
159 .RE
160 .SH "CREDENTIALS"
161 .PP
162 \fBsystemd\-ssh\-generator\fR
163 supports the system credentials logic\&. The following credentials are used when passed in:
164 .PP
165 \fIssh\&.listen\fR
166 .RS 4
167 This credential should be a text file, with each line referencing one additional socket to bind SSH to\&. The syntax should follow the one of
168 \fIListenStream=\fR, see
169 \fBsystemd.socket\fR(5)
170 for details\&. This functionality supports all socket families systemd supports, including
171 \fBAF_INET\fR
172 and
173 \fBAF_INET6\fR\&.
174 .sp
175 Added in version 256\&.
176 .RE
177 .PP
178 \fIssh\&.ephemeral\-authorized_keys\-all\fR
179 .RS 4
180 Provides additional public keys, given in the customary
181 authorized_keys
182 format, for all users, for incoming connections via the generated
183 \fBAF_VSOCK\fR
184 and
185 \fBAF_UNIX\fR
186 socket units\&.
187 .sp
188 The intended use of this is for a host system (in either VM or container configurations) to generate a keypair and inject the public key into the guest, using the private key to connect to any user account on the guest via ssh, without further authentication\&.
189 .sp
190 Added in version 256\&.
191 .RE
192 .SH "SEE ALSO"
193 .PP
194 \fBsystemd\fR(1), \fBkernel-command-line\fR(7), \fBsystemd.system-credentials\fR(7), \fBvsock\fR(7), \fBunix\fR(7), \fBssh\fR(1), \fBsshd\fR(8)
195 .SH "NOTES"
196 .IP " 1." 4
197 Container Interface
198 .RS 4
199 \%https://systemd.io/CONTAINER_INTERFACE
200 .RE