con 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. .TH CON 1
  2. .SH NAME
  3. con, telnet, rx, xms, xmr \- remote login, execution, and XMODEM file transfer
  4. .SH SYNOPSIS
  5. .B con
  6. [
  7. .B -CdnrRsTv
  8. ]
  9. [
  10. .B -b
  11. .I baud
  12. ]
  13. [
  14. .B -l
  15. [
  16. .I user
  17. ]
  18. ]
  19. [
  20. .B -c
  21. .I cmd
  22. ]
  23. .RI [ net !] machine
  24. .PP
  25. .B telnet
  26. [
  27. .B -dCrn
  28. ]
  29. .RI [ net !] machine
  30. .PP
  31. .B cu
  32. .I number
  33. .PP
  34. .B rx
  35. [
  36. .B -eTr
  37. ]
  38. [
  39. .B -l
  40. .I user
  41. ]
  42. .RI [ net !] machine
  43. [
  44. .I command-word ...
  45. ]
  46. .PP
  47. .B xms
  48. [
  49. .B -1p
  50. ]
  51. .I file
  52. .PP
  53. .B xmr
  54. .I file
  55. .SH DESCRIPTION
  56. .I Con
  57. connects to the computer whose network address is
  58. .IR net ! machine
  59. and logs in if possible.
  60. With no options, the account name used on the remote system is the same
  61. as that on the local system.
  62. Standard input and output go to the local machine.
  63. .PP
  64. Options are:
  65. .TP
  66. .B -b
  67. sets the baud rate of a dial-up connection to
  68. .IR baud .
  69. .TP
  70. .B -n
  71. if the input is a file or pipe, do not hang up the connection when EOF is received,
  72. but instead wait for the remote end to hang up.
  73. .TP
  74. .B -l
  75. with an argument causes
  76. .I user
  77. to be used as the account name on the remote system.
  78. Without an argument this option disables automatic login
  79. and a normal login session ensues.
  80. .TP
  81. .B -C
  82. forces cooked mode, that is, local echo.
  83. .TP
  84. .B -c
  85. runs
  86. .I cmd
  87. as if it had been typed as a command from the escape mode.
  88. This is used by
  89. .IR cu .
  90. .TP
  91. .B -v
  92. (verbose mode) causes information about connection attempts
  93. to be output to standard error. This can be useful when
  94. trying to debug network connectivity.
  95. .TP
  96. .B -d
  97. causes debugging information to be output to standard error.
  98. .TP
  99. .B -r
  100. suppresses printing of any carriage return followed by a new line.
  101. This is useful since carriage return is a printable character in
  102. Plan 9.
  103. .TP
  104. .B -R
  105. translates newlines to carriage returns and
  106. .IR "vice versa" .
  107. .TP
  108. .B -T
  109. translates incoming carriage returns to newlines.
  110. .TP
  111. .B -s
  112. strips received characters to 7 bits to forestall
  113. misinterpretation of
  114. .SM ASCII
  115. with parity as
  116. .SM UTF\c
  117. \&.
  118. .PP
  119. The
  120. .RB control\- \e
  121. character is a local escape.
  122. It prompts with
  123. .BR >>> .
  124. Legitimate responses to the prompt are
  125. .TP
  126. .B i
  127. Send a quit [sic] signal to the remote machine.
  128. .PD0
  129. .TP
  130. .B q
  131. Exit.
  132. .TP
  133. .B b
  134. Send a break.
  135. .TP
  136. .B .
  137. Return from the escape.
  138. .TP
  139. .B !cmd
  140. Run the command with the network connection as its
  141. standard input and standard output.
  142. Standard error will go to the screen.
  143. This is useful for transmitting and receiving files
  144. over the connections using programs such as
  145. .IR xms .
  146. .TP
  147. .B r
  148. Toggle printing of carriage returns.
  149. .PD
  150. .PP
  151. .I Telnet
  152. is similar to con, but uses the
  153. .I telnet
  154. protocol to communicate with the remote machine.
  155. It shares
  156. .I con's
  157. .BR -C ,
  158. .BR -d ,
  159. .BR -n ,
  160. and
  161. .BR -r
  162. options.
  163. .PP
  164. .I Rx
  165. executes one shell command
  166. on the remote machine as if logged in there,
  167. but with local standard input and output.
  168. A rudimentary shell environment is provided.
  169. If the target is a Plan 9 machine,
  170. .B $service
  171. there will be
  172. .BR rx .
  173. Options are:
  174. .TP
  175. .B \-e
  176. a zero length message will be written to the
  177. connection when standard input is closed.
  178. .TP
  179. .B \-l
  180. allows
  181. .I user
  182. to be used on the remote machine if the remote
  183. is a BSD machine.
  184. .TP
  185. .B \-r
  186. same as for
  187. .I con
  188. .TP
  189. .B -T
  190. same as for
  191. .I con
  192. .PD
  193. .PP
  194. Network addresses for both
  195. .I con
  196. and
  197. .I rx
  198. have the form
  199. .IB network ! machine\f1.
  200. Supported networks are those listed in
  201. .BR /net .
  202. .PP
  203. The commands
  204. .I xms
  205. and
  206. .I xmr
  207. respectively send and receive a single file using the
  208. XMODEM protocol.
  209. They use standard input and standard output for communication
  210. and are intended for use with
  211. .IR con .
  212. The
  213. .B -1
  214. option to
  215. .I xms
  216. causes it to use kilobyte packet size of 1024 bytes.
  217. The
  218. .B -p
  219. option causes it to print a progress
  220. message every ten kilobytes.
  221. .SH EXAMPLES
  222. .TP
  223. .L
  224. rx kremvax cat file1 >file2
  225. Copy remote
  226. .I file1
  227. to local
  228. .IR file2 .
  229. .TP
  230. .L
  231. rx kremvax cat file1 '>file2'
  232. Copy remote
  233. .I file1
  234. to remote
  235. .IR file2.
  236. .TP
  237. .L
  238. eqn paper | rx kremvax troff -ms | rx deepthought lp
  239. Parallel processing:
  240. do each stage of a pipeline on a different machine.
  241. .SH SOURCE
  242. .TF /sys/src/cmd/con
  243. .TP
  244. .B /sys/src/cmd/con
  245. for
  246. .IR con ,
  247. .IR xms ,
  248. and
  249. .IR xmr .
  250. .TP
  251. .B /sys/src/cmd/ip
  252. for
  253. .IR telnet .
  254. .SH BUGS
  255. Under
  256. .IR rx ,
  257. a program
  258. that should behave specially towards terminals may not: e.g.,
  259. remote shells will not prompt.
  260. Also under
  261. .IR rx ,
  262. the remote standard error and standard output are combined
  263. and go inseparably to the local standard output.