con 4.8 KB

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