1
0

con 5.0 KB

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