1 fb1a36c0 2022-01-09 op .\" Copyright (c) 2021 Omar Polo <op@omarpolo.com>
3 fb1a36c0 2022-01-09 op .\" Permission to use, copy, modify, and distribute this software for any
4 fb1a36c0 2022-01-09 op .\" purpose with or without fee is hereby granted, provided that the above
5 fb1a36c0 2022-01-09 op .\" copyright notice and this permission notice appear in all copies.
7 fb1a36c0 2022-01-09 op .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 fb1a36c0 2022-01-09 op .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 fb1a36c0 2022-01-09 op .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 fb1a36c0 2022-01-09 op .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 fb1a36c0 2022-01-09 op .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 fb1a36c0 2022-01-09 op .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 fb1a36c0 2022-01-09 op .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 2afde960 2022-11-23 op .Dd $Mdocdate: November 23 2022 $
23 fb1a36c0 2022-01-09 op .Op Fl C Ar cert
24 fb1a36c0 2022-01-09 op .Op Fl K Ar key
25 df9bb54d 2022-11-23 op .Op Fl o Ar output
26 9f134f93 2022-11-23 op .Oo 9p:// Oc Ns Oo Ar user Ns @ Oc Ns Ar host Ns Oo : Ns Ar port Oc Ns Op / Ns Ar path
27 fb1a36c0 2022-01-09 op .Sh DESCRIPTION
34 14ae3944 2022-11-23 op names a remote file,
36 14ae3944 2022-11-23 op downloads it in the current directory and exit, otherwise changes the
37 14ae3944 2022-11-23 op remote working directory and starts accepting commands.
39 fb1a36c0 2022-01-09 op The options are as follows:
40 fb1a36c0 2022-01-09 op .Bl -tag -width Ds
44 fb1a36c0 2022-01-09 op .It Fl C Ar certificate
45 ab9f44f7 2022-11-23 op Connect with TLS to the remote server and use the given
46 fb1a36c0 2022-01-09 op .Ar certificate
47 ab9f44f7 2022-11-23 op during the TLS handsahke.
48 fb1a36c0 2022-01-09 op .It Fl K Ar key
49 fb1a36c0 2022-01-09 op Specify the path to the client certificate
51 fb1a36c0 2022-01-09 op to be used during the TLS handshake.
52 3b95ae81 2022-01-30 op If not given, the file passed to
57 ab9f44f7 2022-11-23 op must be provided too.
58 df9bb54d 2022-11-23 op .It Fl o Ar output
59 df9bb54d 2022-11-23 op When fetching the file specified to the command line,
60 df9bb54d 2022-11-23 op save its content in
62 df9bb54d 2022-11-23 op To write the content to standard output, use
64 df9bb54d 2022-11-23 op It's an error to specify
66 df9bb54d 2022-11-23 op when not givin a
70 df9bb54d 2022-11-23 op names a directory.
74 55e8c065 2022-11-23 op parses the input similarly to
76 55e8c065 2022-11-23 op Words are splitted on spaces, multiple spaces are collapsed into one.
81 55e8c065 2022-11-23 op can be used to preserve spaces and other quotes.
83 55e8c065 2022-11-23 op can be used to quote the following character.
84 55e8c065 2022-11-23 op No special meaning is given to
87 55e8c065 2022-11-23 op .Po i.e.\& Sq \en
93 fb1a36c0 2022-01-09 op The following commands are recognized by
95 fb1a36c0 2022-01-09 op .Bl -tag -width Ds
96 fb1a36c0 2022-01-09 op .It Ic bell Oo Cm on | off Oc
97 fb1a36c0 2022-01-09 op Request terminal to sound a bell after each command.
98 fb1a36c0 2022-01-09 op Without arguments toggle the current state.
100 fb1a36c0 2022-01-09 op Terminate the session.
103 11cd7416 2022-01-16 op .It Ic cd Ar remote-path
104 11cd7416 2022-01-16 op Change the working directory on the remote machine to
105 11cd7416 2022-01-16 op .Ar remote-path .
106 11cd7416 2022-01-16 op .It Ic edit Ar remote-path
108 11cd7416 2022-01-16 op .Ar remote-path
109 11cd7416 2022-01-16 op and open it with the preferred editor
118 11cd7416 2022-01-16 op then attempt to re-upload it.
119 11cd7416 2022-01-16 op .It Ic get Ar remote-file Op Ar local-file
121 11cd7416 2022-01-16 op .Ar remote-file
122 11cd7416 2022-01-16 op and save it locally as
123 11cd7416 2022-01-16 op .Ar local-file .
125 11cd7416 2022-01-16 op .Ar local-file
126 11cd7416 2022-01-16 op is not given, use the file name from
127 11cd7416 2022-01-16 op .Ar remote-file .
128 5565d021 2022-01-16 op .It Ic hexdump Oo Cm on | off Oc
129 5565d021 2022-01-16 op Print the packets sent from/to the server.
130 5565d021 2022-01-16 op Without arguments, toggle the current state.
131 11cd7416 2022-01-16 op .It Ic lcd Op Ar local-directory
132 11cd7416 2022-01-16 op Change the local current working directory to
133 11cd7416 2022-01-16 op .Ar local-directory
136 11cd7416 2022-01-16 op if not given.
138 11cd7416 2022-01-16 op Print the local working directory.
139 9c9e60d1 2022-11-23 op .It Ic ls Op Ar path
140 9c9e60d1 2022-11-23 op List the file in the remote current working directory or
143 11cd7416 2022-01-16 op .It Ic page Ar remote-file
145 11cd7416 2022-01-16 op .Ar remote-file
146 11cd7416 2022-01-16 op and open it with the
148 11cd7416 2022-01-16 op .Pq Xr less 1 by default .
149 1c9ab7cf 2022-01-29 op .It Ic pipe Ar remote-file Ar cmd Op Ar args...
151 1c9ab7cf 2022-01-29 op .Ar remote-file
152 1c9ab7cf 2022-01-29 op and pass it as standard input for
154 1c9ab7cf 2022-01-29 op (with optional
155 1c9ab7cf 2022-01-29 op .Ar args Ns ).
156 11cd7416 2022-01-16 op .It Ic put Ar local-file Op Ar remote-file
158 11cd7416 2022-01-16 op .Ar local-file
160 11cd7416 2022-01-16 op .Ar remote-file .
162 11cd7416 2022-01-16 op .Ar remote-file
163 11cd7416 2022-01-16 op is not given,
164 11cd7416 2022-01-16 op use the file name from
165 11cd7416 2022-01-16 op .Ar local-file .
167 fb1a36c0 2022-01-09 op Terminate the session.
170 424338c2 2022-01-29 op .It Ic rename Ar remote-file Ar new-remote-name
172 13b8bb0a 2022-01-17 op .Ar remote-file
174 13b8bb0a 2022-01-17 op .Ar new-remote-name
175 13b8bb0a 2022-01-17 op on the remote server.
177 f99c17f9 2022-11-23 op Remove the remote files.
178 fb1a36c0 2022-01-09 op .It Ic verbose Oo Cm on | off Oc
179 fb1a36c0 2022-01-09 op Print verbose information.
180 fb1a36c0 2022-01-09 op Without arguments toggle the current state.
182 11cd7416 2022-01-16 op .Sh ENVIRONMENT
183 11cd7416 2022-01-16 op The following environment variables are inspected:
184 11cd7416 2022-01-16 op .Bl -tag -width Ds
186 11cd7416 2022-01-16 op The user login directory.
188 7d4a725d 2022-01-17 op The pager to use,
191 16012c8f 2022-10-07 op .It Ev VISUAL , Ev EDITOR
192 11cd7416 2022-01-16 op The program used to edit files.
194 11cd7416 2022-01-16 op is inspected first,
196 11cd7416 2022-01-16 op as a fallback.
197 11cd7416 2022-01-16 op If both are undefined,
199 11cd7416 2022-01-16 op is given some love.
201 6cd1a16b 2022-10-07 op Default login, used if no
203 6cd1a16b 2022-10-07 op is given on the command line.
211 fb1a36c0 2022-01-09 op utility was written by
212 fb1a36c0 2022-01-09 op .An Omar Polo Aq Mt op@omarpolo.com .