dbclient.1 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. .TH dbclient 1
  2. .SH NAME
  3. dbclient \- lightweight SSH client
  4. .SH SYNOPSIS
  5. .B dbclient
  6. [\fIflag arguments\fR] [\-p
  7. .I port\fR] [\-i
  8. .I id\fR] [\-L
  9. .I l\fR:\fIh\fR:\fIp\fR] [\-R
  10. .I l\fR:\fIh\fR:\fIp\fR] [\-l
  11. .IR user ]
  12. .I host
  13. .RI [ \fImore\ flags\fR ]
  14. .RI [ command ]
  15. .B dbclient
  16. [\fIargs\fR]
  17. [\fIuser1\fR]@\fIhost1\fR[^\fIport1\fR],[\fIuser2\fR]@\fIhost2\fR[^\fIport2\fR],...
  18. .SH DESCRIPTION
  19. .B dbclient
  20. is the client part of Dropbear SSH
  21. .SH OPTIONS
  22. .TP
  23. .TP
  24. .B command
  25. A command to run on the remote host. This will normally be run by the remote host
  26. using the user's shell. The command begins at the first hyphen argument after the
  27. host argument. If no command is specified an interactive terminal will be opened
  28. (see -t and -T).
  29. .TP
  30. .B \-p \fIport
  31. Connect to
  32. .I port
  33. on the remote host. Alternatively a port can be specified as hostname^port.
  34. Default is 22.
  35. .TP
  36. .B \-i \fIidfile
  37. Identity file.
  38. Read the identity key from file
  39. .I idfile
  40. (multiple allowed). This file is created with dropbearkey(1) or converted
  41. from OpenSSH with dropbearconvert(1). The default path ~/.ssh/id_dropbear is used
  42. .TP
  43. .B \-L\fR [\fIlistenaddress\fR]:\fIlistenport\fR:\fIhost\fR:\fIport\fR
  44. Local port forwarding.
  45. Forward
  46. .I listenport
  47. on the local host through the SSH connection to
  48. .I port
  49. on
  50. .IR host .
  51. .TP
  52. .B \-R\fR [\fIlistenaddress\fR]:\fIlistenport\fR:\fIhost\fR:\fIport\fR
  53. Remote port forwarding.
  54. Forward
  55. .I listenport
  56. on the remote host through the SSH connection to
  57. .I port
  58. on
  59. .IR host .
  60. .TP
  61. .B \-l \fIuser
  62. Username.
  63. Login as
  64. .I user
  65. on the remote host. An alternative is to specify user@host.
  66. .TP
  67. .B \-t
  68. Allocate a PTY. This is the default when no command is given, it gives a full
  69. interactive remote session. The main effect is that keystrokes are sent remotely
  70. immediately as opposed to local line-based editing.
  71. .TP
  72. .B \-T
  73. Don't allocate a PTY. This is the default when a command is given. See -t.
  74. .TP
  75. .B \-N
  76. Don't request a remote shell or run any commands. Any command arguments are ignored.
  77. .TP
  78. .B \-f
  79. Fork into the background after authentication. A command argument (or -N) is required.
  80. This is useful when using password authentication.
  81. .TP
  82. .B \-g
  83. Allow non-local hosts to connect to forwarded ports. Applies to -L and -R
  84. forwarded ports, though remote connections to -R forwarded ports may be limited
  85. by the ssh server.
  86. .TP
  87. .B \-y
  88. Always accept hostkeys if they are unknown. If a hostkey mismatch occurs the
  89. connection will abort as normal. If specified a second time no host key checking
  90. is performed at all, this is usually undesirable.
  91. .TP
  92. .B \-A
  93. Forward agent connections to the remote host. dbclient will use any
  94. OpenSSH-style agent program if available ($SSH_AUTH_SOCK will be set) for
  95. public key authentication. Forwarding is only enabled if -A is specified.
  96. .TP
  97. .B \-W \fIwindowsize
  98. Specify the per-channel receive window buffer size. Increasing this
  99. may improve network performance at the expense of memory use. Use -h to see the
  100. default buffer size.
  101. .TP
  102. .B \-K \fItimeout_seconds
  103. Ensure that traffic is transmitted at a certain interval in seconds. This is
  104. useful for working around firewalls or routers that drop connections after
  105. a certain period of inactivity. The trade-off is that a session may be
  106. closed if there is a temporary lapse of network connectivity. A setting
  107. if 0 disables keepalives. If no response is received for 3 consecutive keepalives the connection will be closed.
  108. .TP
  109. .B \-I \fIidle_timeout
  110. Disconnect the session if no traffic is transmitted or received for \fIidle_timeout\fR seconds.
  111. .TP
  112. .\" TODO: how to avoid a line break between these two -J arguments?
  113. .B \-J \fIproxy_command
  114. .TP
  115. .B \-J \fI&fd
  116. .br
  117. Use the standard input/output of the program \fIproxy_command\fR rather than using
  118. a normal TCP connection. A hostname should be still be provided, as this is used for
  119. comparing saved hostkeys. This command will be executed as "exec proxy_command ..." with the
  120. default shell.
  121. The second form &fd will make dbclient use the numeric file descriptor as a socket. This
  122. can be used for more complex tunnelling scenarios. Example usage with socat is
  123. socat EXEC:'dbclient -J &38 ev',fdin=38,fdout=38 TCP4:host.example.com:22
  124. .TP
  125. .B \-B \fIendhost:endport
  126. "Netcat-alike" mode, where Dropbear will connect to the given host, then create a
  127. forwarded connection to \fIendhost\fR. This will then be presented as dbclient's
  128. standard input/output.
  129. .TP
  130. .B \-c \fIcipherlist
  131. Specify a comma separated list of ciphers to enable. Use \fI-c help\fR to list possibilities.
  132. .TP
  133. .B \-m \fIMAClist
  134. Specify a comma separated list of authentication MACs to enable. Use \fI-m help\fR to list possibilities.
  135. .TP
  136. .B \-o \fIoption
  137. Can be used to give options in the format used by OpenSSH config file. This is
  138. useful for specifying options for which there is no separate command-line flag.
  139. For full details of the options listed below, and their possible values, see
  140. ssh_config(5).
  141. The following options have currently been implemented:
  142. .RS
  143. .TP
  144. .B ExitOnForwardFailure
  145. Specifies whether dbclient should terminate the connection if it cannot set up all requested local and remote port forwardings. The argument must be "yes" or "no". The default is "no".
  146. .TP
  147. .B UseSyslog
  148. Send dbclient log messages to syslog in addition to stderr.
  149. .TP
  150. .B Port
  151. Specify a listening port, like the \fI-p\fR argument.
  152. .RE
  153. .TP
  154. .B \-s
  155. The specified command will be requested as a subsystem, used for sftp. Dropbear doesn't implement sftp itself but the OpenSSH sftp client can be used eg \fIsftp -S dbclient user@host\fR
  156. .TP
  157. .B \-b \fI[address][:port]
  158. Bind to a specific local address when connecting to the remote host. This can be used to choose from
  159. multiple outgoing interfaces. Either address or port (or both) can be given.
  160. .TP
  161. .B \-V
  162. Print the version
  163. .SH MULTI-HOP
  164. Dropbear will also allow multiple "hops" to be specified, separated by commas. In
  165. this case a connection will be made to the first host, then a TCP forwarded
  166. connection will be made through that to the second host, and so on. Hosts other than
  167. the final destination will not see anything other than the encrypted SSH stream.
  168. A port for a host can be specified with a caret (eg matt@martello^44 ).
  169. This syntax can also be used with scp or rsync (specifying dbclient as the
  170. ssh/rsh command). A file can be "bounced" through multiple SSH hops, eg
  171. scp -S dbclient matt@martello,root@wrt,canyons:/tmp/dump .
  172. Note that hostnames are resolved by the prior hop (so "canyons" would be resolved by the host "wrt")
  173. in the example above, the same way as other -L TCP forwarded hosts are. Host keys are
  174. checked locally based on the given hostname.
  175. .SH ESCAPE CHARACTERS
  176. Typing a newline followed by the key sequence \fI~.\fR (tilde, dot) will terminate a connection.
  177. The sequence \fI~^Z\fR (tilde, ctrl-z) will background the connection. This behaviour only
  178. applies when a PTY is used.
  179. .SH ENVIRONMENT
  180. .TP
  181. .B DROPBEAR_PASSWORD
  182. A password to use for remote authentication can be specified in the environment
  183. variable DROPBEAR_PASSWORD. Care should be taken that the password is not
  184. exposed to other users on a multi-user system, or stored in accessible files.
  185. .TP
  186. .B SSH_ASKPASS
  187. dbclient can use an external program to request a password from a user.
  188. SSH_ASKPASS should be set to the path of a program that will return a password
  189. on standard output. This program will only be used if either DISPLAY is set and
  190. standard input is not a TTY, or the environment variable SSH_ASKPASS_ALWAYS is
  191. set.
  192. .SH NOTES
  193. If compiled with zlib support and if the server supports it, dbclient will
  194. always use compression.
  195. .SH AUTHOR
  196. Matt Johnston (matt@ucc.asn.au).
  197. .br
  198. Mihnea Stoenescu wrote initial Dropbear client support
  199. .br
  200. Gerrit Pape (pape@smarden.org) wrote this manual page.
  201. .SH SEE ALSO
  202. dropbear(8), dropbearkey(1)
  203. .P
  204. https://matt.ucc.asn.au/dropbear/dropbear.html