File Transfer - issinoho/veetee GitHub Wiki
File Transfer
veetee transfers files with Kermit, over whatever connection a session has: Telnet, SSH, a serial line, LAT, or a local command. From 1.3.0.
Kermit is how a file leaves a machine whose only connection is a terminal line β a serial console, a LAT service β with no SCP or FTP to fall back on, and it is what OpenVMS systems have: C-Kermit for OpenVMS, or KERMIT-32 on older ones. No DEC terminal did file transfer, so this is an addition to the terminal rather than an emulation of one, and nothing changes while no transfer is running.
In the window
Start the host's Kermit first, then choose the matching item from the window menu.
Receiving a file from the host:
$ KERMIT
C-Kermit> SEND NOTES.TXT
then Receive Fileβ¦, and pick a folder (Downloads to begin with). Several files at once:
MSEND NOTES.TXT DATA.BIN, or a wildcard such as SEND *.TXT.
Sending a file to the host:
$ KERMIT
C-Kermit> RECEIVE
then Send Fileβ¦, and pick one file or several.
While a transfer runs, a bar above the screen shows the file and how far it has got, and a message says how it ended. What the host sends goes to the transfer rather than the screen, keys typed are dropped, and a session log pauses; the host's own output either side of it, its Kermit prompt included, reaches the screen as usual. A small file can finish before the bar is seen.
Cancel stops the transfer: once to stop tidily, telling the host to throw the file away, twice to stop at once.
Text and binary
Nothing needs setting at either end, where the host's Kermit takes attribute packets, as C-Kermit does. Each file veetee sends goes as text or binary by what is in it, and the host is told which: on OpenVMS, text arrives as variable-length records and binary as fixed 512-byte records, and both come back exactly as they went. Receiving, veetee takes the host's word for each file, and C-Kermit decides that by looking at each one.
A Kermit without attribute packets treats everything as binary unless told otherwise, and then
text sent to it keeps its carriage returns: put it in text mode first β SET FILE TYPE TEXT in
C-Kermit, or the equivalent in that Kermit's own help.
File names
A received file's name is the host's choice, so veetee makes it safe before anything is written:
only its last part is kept, so a host cannot choose where on your disk it lands, and an OpenVMS
name loses its version and its capitals β DKA0:[SYSMGR]LOGIN.COM;3 arrives as login.com. An
existing file is never overwritten: a second login.com arrives as login.1.com. A file that does
not arrive complete is removed.
Limits
- Speed. From 1.4.0, packets are up to 9 KB where the other Kermit offers long packets, as C-Kermit and G-Kermit do: they start small and grow while they get through, and shrink when one has to be sent again, so a slow line settles on what it can carry. 20 MB to OpenVMS over LAT took 16 minutes over Wi-Fi and 31 on the cable, the pace there being the host's. With short packets (1.3.0, or a Kermit without long packets) it was about 25β30 KB/s on a LAN. On a serial line at 9600 baud the line is the limit anyway.
- A cancelled transfer to C-Kermit can leave a partial file. C-Kermit's default,
SET FILE INCOMPLETE AUTO, keeps an incomplete binary file even when told to throw it away.SET FILE INCOMPLETE DISCARDat the host's prompt stops that. - On a line with parity (7 bits, even parity, say), start C-Kermit on OpenVMS with the parity
on its command line β
kermit -p e -rto receive,kermit -p e -i -s FILEto send a binary file. At its own prompt C-Kermit reads what you type with the parity bit still on, so Return never ends a command and Ctrl+C and Ctrl+Y do not get you out; a session stuck there has to be stopped (STOP/ID) from another. veetee needs nothing: eighth-bit prefixing is always asked for, and a binary file crosses a seven-bit line intact. - Tested against C-Kermit 9.0.300 on OpenVMS IA64 over every connection veetee has β Telnet, SSH, LAT and a serial line at 9600 baud, 8N1 and 7E1 (a USB adapter to a terminal port) β and C-Kermit 10 and G-Kermit 2.01 on Linux. Not yet against KERMIT-32.
Without the window
vt-headless kermit does the same from the command line, for scripts:
vt-headless kermit receive --into ~/incoming --serial /dev/ttyUSB0 -b 9600
vt-headless kermit send LOGIN.COM --telnet vms1
vt-headless kermit alone lists its options. The host's Kermit has to be waiting already, which
suits a serial console where a session stays logged in; over Telnet or SSH a new connection means
a new login.
See also Troubleshooting, and the plan and its findings in docs/kermit.md.