📄 ckuker.nr
字号:
command prompt by using the PUSH, RUN (!), EDIT, or BROWSE command.While the inferior shell or command is active, Kermit is suspended anddoes nothing. Return to Kermit Command state by exiting from theinferior shell or application..TPConnect stateIn this state, which can be entered only when in Local mode (i.e. whenKermit has made a connection to another computer), Kermit is acting asa terminal to the remote computer. Your keystrokes are sent to theremote computer and characters that arrive over the communicationconnection are displayed on your screen. This state is entered whenyou give a CONNECT, DIAL, TELNET, RLOGIN, or IKSD command. You canreturn to command state by logging out of the remote computer, or bytyping:.sp Ctrl-\ec.spThat is: Hold down the Ctrl key and press the backslash key, then letgo of the Ctrl key and press the C key. This is called escaping back.Certain other escape-level commands are also provided; type Ctrl-\e?for a list. For example, you can enter Shell state with:.sp Ctrl-\e!.spTo send a Ctrl-\e to the host while in Connect state, type two of themin a row. See HELP CONNECT and HELP SET ESCAPE for more info..TPLocal file-transfer stateIn this state, Kermit is sending packets back and forth with the othercomputer in order to transfer a file or accomplish some otherfile-related task. And at the same time, it is displaying its progresson your screen and watching your keyboard for interruptions. In thisstate, the following single-keystroke commands are accepted:.sp.RS.TPXInterrupt the current file and go on to the next (if any)..TPZInterrupt the current file and skip all the rest..TPELike Z but uses a "stronger" protocol (use if X or Z don't work)..TPCtrl-CInterrupt file-transfer mode (use if Z or E don't work)..sp.REKermit returns to its previous state (Command or Connect) when thetransfer is complete or when interrupted successfully by X, Z, E, orCtrl-C (hold down the Ctrl key and press the C key)..TPRemote file-transfer stateIn this state, Kermit is exchanging file-transfer packets with itslocal partner over its standard i/o. It leaves this stateautomatically when the transfer is complete. In case you find yourlocal Kermit in Connect state and the remote one in File-transferstate (in which it seems to ignore your keystrokes), you can usuallyreturn it to command state by typing three Ctrl-C's in a row. If thatdoesn't work, return your local Kermit to Command state (Ctrl-\e C) andtype "e-packet" and then press the Return or Enter key; this forces afatal Kermit protocol error..TPRemote Server stateThis is like Remote File-transfer state, except it never returnsautomatically to Command state. Rather, it awaits further instructionsfrom the client program; that is, from your Local Kermit program. Youcan return the Remote Server to its previous state by issuing a"finish" command to the client, or if you are in Connect state, bytyping three Ctrl-C's in a row. You can tell the server job to log outand break the connection by issuing a "bye" command to the client..TPLocal Server stateLike Remote-Server state, but in local mode, and therefore with itsfile-transfer display showing, and listening for single-key commands,as in Local File-transfer state. Usually this state is enteredautomatically when a remote Kermit program gives a GET command..spC-Kermit, Kermit 95, and MS-DOS Kermit all can switch automatically fromConnect state to Local File-transfer state when you initiate a filetransfer from the remote computer by starting Kermit and telling it to sendor get a file, in which case, Connect state is automatically resumed afterthe file transfer is finished..spNote that C-Kermit is not a terminal emulator. It is a communicationsapplication that you run in a terminal window (e.g. console or Xterm). Thespecific emulation, such as VT100, VT220, Linux Console, or Xterm, isprovided by the terminal window in which you are running C-Kermit. Kermit95 and MS-DOS Kermit, on the other hand, are true terminal emulators. Whyis C-Kermit not a terminal emulator? CLICK HERE to read about it..SH MAKING CONNECTIONSHere is how to make different kinds of connections using interactive Kermitcommands (as noted above, you can also make connections with command-lineoptions). Note that you don't have to make connections with Kermit. It canalso be used on the far end of a connection as the remote file transfer andmanagement partner of your local communications software..TPMaking a Telnet ConnectionAt the C-Kermit command prompt, simply type:.sp.nf telnet foo.bar.com.fi.sp(substituting desired hostname or address). You can also include a port number:.sp.nf telnet xyzcorp.com 3000 ; .fi.spIf the connection is successful, Kermit automically enters Connectstate. When you logout from the remote host, Kermit automaticallyreturns to its prompt. More info: HELP TELNET, HELP SET TELNET, HELPSET TELOPT. Also see the IKSD section below..TPMaking an Rlogin connectionThis is just like Telnet, except you have to be root to do it becauseRlogin uses a privileged TCP port:.sp.nf rlogin foo.bar.com.fi.spMore info: HELP RLOGIN..TPMaking an SSH ConnectionUnlike Telnet and Rlogin, SSH connections are not built-in, buthandled by running your external SSH client through a pseudoterminal.Using C-Kermit to control the SSH client gives you all of Kermit'sfeatures (file transfer, character-set conversion, scripting, etc)over SSH..sp ssh foo.bar.com.spMore info: HELP SSH, HELP SET SSH..TPDialing with a ModemIf it's an external modem, make sure it is connected to a usableserial port on your computer with a regular (straight-through) modemcable, and to the telephone jack with a telephone cable, and that it'sturned on. Then use these commands:.sp.nf set modem type usrobotics ; Or other supported type set line /dev/ttyS0 ; Specify device name set speed 57600 ; Or other desired speed set flow rts/cts ; Most modern modems support this set dial method tone ; (or pulse) dial 7654321 ; Dial the desired number.fi.spType "set modem type ?" for a list of supported modem types. If youomit the SET MODEM TYPE command, the default type is"generic-high-speed", which should work for most modern AT-command-setmodems. If the line is busy, Kermit redials automatically. If the calldoes not succeed, use "set dial display on" and try it again to watchwhat happens. If the call succeeds, Kermit enters Connect stateautomatically and returns to its prompt automatically when you log outfrom the remote computer or the connection is otherwise lost..spYou can also dial from a modem that is accessible by Telnet, e.g. to areverse terminal server. In this case the command sequence is:.sp.nf set host ts.xxx.com 2000 ; Terminal-server and port set modem type usrobotics ; Or other supported type set dial method tone ; (or pulse) dial 7654321 ; Dial the desired number.fi.spIf the terminal server supports the Telnet Com Port Option, RFC 2217,you can also give serial-port related commands such as SET SPEED, SETPARITY, and so on, and Kermit relays them to the terminal server usingthe protocol specified in the RFC..spMore info: HELP SET MODEM, HELP SET LINE, HELP SET SPEED, HELP SETFLOW, HELP DIAL, HELP SET DIAL, HELP SET MODEM, HELP SET CARRIER-WATCH, SHOW COMMUNICATIONS, SHOW MODEM, SHOW DIAL..TPDirect Serial PortConnect the two computers, A and B, with a null modem cable (or twomodem cables interconnected with a null-modem adapter or modemeliminator). From Computer A:.sp.nf set modem type none ; There is no modem set line /dev/ttyS0 ; Specify device name set carrier-watch off ; If DTR CD are not cross-connected set speed 57600 ; Or other desired speed set flow rts/cts ; If RTS and CTS are cross-connected set parity even ; (or "mark" or "space", if necessary) set stop-bits 2 ; (rarely necessary) set flow xon/xoff ; If you can't use RTS/CTS connect ; Enter Connect (terminal) state.fi.spThis assumes Computer B is set up to let you log in. If it isn't, you can run a copy of Kermit on Computer B and follow approximately thesame directions. More info: As above plus HELP CONNECT..PPWith modems or direct serial connections, you might also have to "setparity even" (or "mark" or "space") if it's a 7-bit connection..PPOf the connection types listed above, only one can be open at a time.However, any one of these can be open concurrently with an FTP or HTTPsession. Each connection type can be customized to any desired degree,scripted, logged, you name it. See the manual..PPNOTE: On selected platforms, C-Kermit also can make X.25 connections. Seethe manual for details..SH TRANSFERRING FILES WITH KERMITThere is a widespread and persistent belief that Kermit is a slow protocol.This is because, until recently, it used conservative tuning by default tomake sure file transfers succeeded, rather than failing because theyoverloaded the connection. Some extra commands (or command-line options,like -Q) were needed to make it go fast, but nobody bothered to find outabout them. Also, it takes two to tango: most non-Kermit-Project Kermitprotocol implementations really ARE slow. The best file-transfer partnersfor C-Kermit are: another copy of C-Kermit (7.0 or later) and Kermit 95.These combinations work well and they work fast by default. MS-DOS Kermitis good too, but you have to tell it to go fast (by giving it the FASTcommand)..PPFurthermore, all three of these Kermit programs support "autodownload" and"autoupload", meaning that when they are in Connect state and a Kermitpacket comes in from the remote, they automatically switch into filetransfer mode..PPAnd plus, C-Kermit and K95 also switch automatically between text andbinary mode for each file, so there is no need to "set file type binary" or"set file type text", or to worry about files being corrupted because theywere transferred in the wrong mode..PPWhat all of these words add up to is that now, when you use up-to-dateKermit software from the Kermit Project, file transfer is not only fast,it's ridiculously easy. You barely have to give any commands at all..TPDownloading FilesLet's say you have Kermit 95, C-Kermit, or MS-DOS Kermit on yourdesktop computer, with a connection to a Unix computer that hasC-Kermit installed as "kermit". To download a file (send it from Unixto your desktop computer), just type the following command at yourUnix shell prompt:.sp kermit -s oofa.txt.sp(where oofa.txt is the filename). If you want to send more than onefile, you can put as many filenames as you want on the command line,and they can be any combination of text and binary:.sp kermit -s oofa.txt oofa.zip oofa.html oofa.tar.gz.spand/or you can use wildcards to send groups of files:.sp kermit -s oofa.*.spIf you want to send a file under an assumed name, use:.sp kermit -s friday.txt -a today.txt.spThis sends the file friday.txt but tells the receiving Kermit that itsname is today.txt. In all cases, as noted, when the file transfer isfinished, your desktop Kermit returns automatically to Connect state.No worries about escaping back, re-connecting, text/binary modeswitching. Almost too easy, right?.TPUploading FilesTo upload files (send them from your desktop computer to the remoteUnix computer) do the same thing, but use the -g (GET) option insteadof -s:.sp kermit -g oofa.txt.spThis causes your local Kermit to enter server mode; then the remoteKermit program requests the named file and the local Kermit sends itand returns automatically to Connect state when done..spIf you want to upload multiple files, you have have use shell quotingrules, since these aren't local files:.sp.nf kermit -g "oofa.txt oofa.zip oofa.html oofa.tar.gz" kermit -g "oofa.*".fi.spIf you want to upload a file but store it under a different name, use:.sp kermit -g friday.txt -a today.txt.TPKermit Transfers the Old-Fashioned WayIf your desktop communications software does not support autoupload orautodownload, or it does not include Kermit server mode, the procedurerequires more steps..spTo download a file, type:.sp kermit -s filename.spon the host as before, but if nothing happens automatically inresponse to this command, you have to switch your desktopcommunications software into Kermit Receive state. This might be doneby escaping back using keyboard characters or hot keys (Alt-x istypical) and/or with a command (like RECEIVE) or a menu. When the filetransfer is complete, you have to go back to Connect state, Terminalemulation, or whatever terminology applies to your desktopcommunications software..spTo upload a file, type:.sp kermit -r.spon the host (rather than "kermit -g"). This tells C-Kermit to waitpassively for a file to start arriving. Then regain the attention ofyour desktop software (Alt-x or whatever) and instruct it to send thedesired file(s) with Kermit protocol. When the transfer is finished,return to the Connect or Terminal screen..TPIf File Transfer FailsAlthough every aspect of Kermit's operation can be finely tuned, thereare also three short and simple "omnibus tuning" commands you can usefor troubleshooting:.RS.TPFASTUse fast file-transfer settings. This has been the default sinceC-Kermit 7.0 now that most modern computers and connectionssupport it. If transfers fail with fast settings, try . . ..TPCAUTIOUSUse cautious but not paranoid settings. File transfers, if theywork, will go at medium speed. If not, try . . ..TPROBUSTUse the most robust, resilient, conservative, safe, and reliablesettings. File transfers will almost certainly work, but theywill be quite slow (of course this is a classic tradeoff; ROBUSTwas C-Kermit's default tuning in versions 6.0 and earlier, whichmade everybody think Kermit protocol was slow). If ROBUST doesn'tdo the trick, try again with SET PARITY SPACE first in case it'snot an 8-bit connection..RE.spObviously the success and performance of a file transfer also dependson C-Kermit's file transfer partner. Up-to-date, real Kermit Projectpartners are recommended because they contain the best Kermit protocolimplementations and because we can support them in case of trouble..spIf you still have trouble, consult Chapter 10 of Using C-Kermit, orsend email to kermit-support@columbia.edu..TPAdvanced Kermit File-Transfer FeaturesObviously there is a lot more to Kermit file transfer, including allsorts of interactive commands, preferences, options, logging,debugging, troubleshooting, and anything else you can imagine butthat's what the manual and updates are for. Here are a few topics youcan explore if you're interested by Typing HELP for the listedcommands:.RS.TPLogging transfers:LOG TRANSACTIONS (HELP LOG).TPAutomatic per-file text/binary mode switching:SET TRANSFER MODE { AUTOMATIC, MANUAL } (HELP SET TRANSFER).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -