Debian Codegraph @

upstream/debian-trixie/man1/systemd-ssh-proxy.1

raw
1 '\" t
2 .TH "SYSTEMD\-SSH\-PROXY" "1" "" "systemd 257.13" "systemd-ssh-proxy"
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-proxy \- SSH client plugin for connecting to \fBAF_VSOCK\fR and \fBAF_UNIX\fR sockets
24 .SH "SYNOPSIS"
25 .sp
26 .nf
27 Host unix/* vsock/* vsock\-mux/*
28 ProxyCommand /usr/lib/systemd/systemd\-ssh\-proxy %h %p
29 ProxyUseFdpass yes
30 .fi
31 .HP \w'\fB/usr/lib/systemd/systemd\-ssh\-proxy\fR\ 'u
32 \fB/usr/lib/systemd/systemd\-ssh\-proxy\fR [ADDRESS] [PORT]
33 .SH "DESCRIPTION"
34 .PP
35 \fBsystemd\-ssh\-proxy\fR
36 is a small "proxy" plugin for the
37 \fBssh\fR(1)
38 tool that allows connecting to
39 \fBAF_UNIX\fR
40 and
41 \fBAF_VSOCK\fR
42 sockets\&. It implements the interface defined by
43 ssh\*(Aqs
44 \fIProxyCommand\fR
45 configuration option\&. It\*(Aqs supposed to be used with an
46 \fBssh_config\fR(5)
47 configuration fragment like the following:
48 .sp
49 .if n \{\
50 .RS 4
51 .\}
52 .nf
53 Host unix/* vsock/* vsock\-mux/*
54 ProxyCommand /usr/lib/systemd/systemd\-ssh\-proxy %h %p
55 ProxyUseFdpass yes
56 CheckHostIP no
57
58 Host \&.host
59 ProxyCommand /usr/lib/systemd/systemd\-ssh\-proxy unix/run/ssh\-unix\-local/socket %p
60 ProxyUseFdpass yes
61 CheckHostIP no
62 .fi
63 .if n \{\
64 .RE
65 .\}
66 .PP
67 A configuration fragment along these lines is by default installed into
68 /etc/ssh/ssh_config\&.d/20\-systemd\-ssh\-proxy\&.conf\&.
69 .PP
70 With this in place, SSH connections to host string
71 "unix/"
72 followed by an absolute
73 \fBAF_UNIX\fR
74 file system path to a socket will be directed to the specified socket, which must be of type
75 \fBSOCK_STREAM\fR\&. Similar, SSH connections to
76 "vsock/"
77 followed by an
78 \fBAF_VSOCK\fR
79 CID will result in an SSH connection made to that CID\&.
80 "vsock\-mux/"
81 followed by an absolute
82 \fBAF_UNIX\fR
83 file system path to a socket is similar but for cloud\-hypervisor/firecracker which do not allow direct
84 \fBAF_VSOCK\fR
85 communication between the host and guests, and provide their own multiplexer over
86 \fBAF_UNIX\fR
87 sockets\&. See
88 \m[blue]\fBcloud\-hypervisor VSOCK support\fR\m[]\&\s-2\u[1]\d\s+2
89 and
90 \m[blue]\fBUsing the Firecracker Virtio\-vsock Device\fR\m[]\&\s-2\u[2]\d\s+2\&.
91 .PP
92 Moreover, connecting to
93 "\&.host"
94 will connect to the local host via SSH, without involving networking\&.
95 .PP
96 This tool is supposed to be used together with
97 \fBsystemd-ssh-generator\fR(8)
98 which when run inside a VM or container will bind SSH to suitable addresses\&.
99 \fBsystemd\-ssh\-generator\fR
100 is supposed to run in the container or VM guest, and
101 \fBsystemd\-ssh\-proxy\fR
102 is run on the host, in order to connect to the container or VM guest\&.
103 .SH "EXIT STATUS"
104 .PP
105 On success, 0 is returned, a non\-zero failure code otherwise\&.
106 .SH "EXAMPLES"
107 .PP
108 \fBExample\ \&1.\ \&Talk to a local VM with CID 4711\fR
109 .sp
110 .if n \{\
111 .RS 4
112 .\}
113 .nf
114 ssh vsock/4711
115 .fi
116 .if n \{\
117 .RE
118 .\}
119 .PP
120 \fBExample\ \&2.\ \&Talk to a VM guest hosted with cloud\-hypervisor/firecracker\fR
121 .sp
122 .if n \{\
123 .RS 4
124 .\}
125 .nf
126 ssh vsock\-mux/run/vm\-1234\&.sock
127 .fi
128 .if n \{\
129 .RE
130 .\}
131 .PP
132 \fBExample\ \&3.\ \&Talk to the local host via ssh\fR
133 .sp
134 .if n \{\
135 .RS 4
136 .\}
137 .nf
138 ssh \&.host
139 .fi
140 .if n \{\
141 .RE
142 .\}
143 .PP
144 or equivalent:
145 .sp
146 .if n \{\
147 .RS 4
148 .\}
149 .nf
150 ssh unix/run/ssh\-unix\-local/socket
151 .fi
152 .if n \{\
153 .RE
154 .\}
155 .SH "SEE ALSO"
156 .PP
157 \fBsystemd\fR(1), \fBsystemd-ssh-generator\fR(8), \fBvsock\fR(7), \fBunix\fR(7), \fBssh\fR(1), \fBsshd\fR(8)
158 .SH "NOTES"
159 .IP " 1." 4
160 cloud-hypervisor VSOCK support
161 .RS 4
162 \%https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/docs/vsock.md
163 .RE
164 .IP " 2." 4
165 Using the Firecracker Virtio-vsock Device
166 .RS 4
167 \%https://github.com/firecracker-microvm/firecracker/blob/main/docs/vsock.md
168 .RE