Hello! Thank you for starting me up! I'm the Kermit protocol and I'm happy to hel... wait, you want to transfer <i>what</i> file? What the hell is a <i>giga</i>byte? Well, man, OK, you're the user so you know best, but man, this is going to take like, days man, settle in, here we gooo<p>ooooooo whooooooo OOOOOOOOO <i>AAAAAAAAAAAAAAA !!!!!!!!!!1!! qcjqrjrcorRC!!!</i><p>WHAT THE HECK WAS THAT? Did I just do <i>megabytes per second</i>? Holy shit. Am I high or something? What is this hardware? What is going on here?<p>No... wait... is that the end? Am I done here? No! No, I want to transfer more! More! Megabytes per second! Gigabytes per second! I can see it now, I want it, I want more, please, let's transfer another file, come on man, I want to ride again, please ple<p><pre><code> EXECUTION COMPLETED
$</code></pre>
How I contributed to Emacs<p>Once when I should've been in college still, I was using the Telix terminal program on a 286 with a 2400MNP5 modem. Now Telix had a really awesome scripting language that could do all sorts of terminal magic, but that's a story for another day.<p>My connection to the Internet was 8-bit clean, and at the time I was an avid Emacs user/evangelist. (Since then, I have seen the light of vim's face and have never turned away.)<p>I saw that Emacs included a mapping file for mskermit to generate ESC sequences for Alt+Keypress, and I figured out that if I mapped each scancode for Alt+Keypress to the appropriate 8-bit code, it would convert my Alt key into a Meta buckybit, perfect for Emacs usage!<p>So I painstakingly mapped out each scancode and transcribed it into the ms-kermit configuration, and before long I was Emacsing in all its 8-bit-meta-glory.<p>I figured it would be useful to other Emacs users, and so I sent the file upstream. Lo and behold, it was incorporated into the standard Emacs distribution, and it stayed that way for a long, long time.<p>Unfortunately, since I had never formally assigned copyright or done whatever legal bit needs to be done to GPL the code, TPTB did an audit of the Emacs distro and culled any code that did not have solid legal footing. At that point, ms-kermit was really obsolete anyway, so I suppose it's all for the best!
My only source of internet in undergrad was dialing into my university's modem pool and getting a shell on the main server (a DEC Alpha running OSF/1). Browsing the web was done through lynx.<p>That worked fine but every now and then, a site would have some inline image that I'd want to see, so I'd view source to get the img URL and then download that to /tmp and transfer the file to my local machine via zmodem. Usually, it wouldn't be worth the effort. I'd also download mp3s off IRC via DCC and queue up a bunch of data for zmodem to transfer overnight or when I was in class. I really appreciated those bytes back then. Now, not so much.
The article mentions 'Terminate'. That software was a joy to use.<p><a href="https://web.archive.org/web/19980627010642/http://www.terminate.com/tour/tour-setup.html" rel="nofollow">https://web.archive.org/web/19980627010642/http://www.termin...</a>
Last year we implemented "ymodem over BLE" for reasons that are complicated and possibly stupid.<p>It felt familiar but strange and wrong to do such a thing. Worked great though.
So, on the one hand ...<p>I have actually used 'sz' and 'rz' in <i>relatively</i> modern times for quick and dirty file transfer and found it very convenient in a very narrow set of use-cases.<p>However ...<p>It's a serious violation of the cleanliness and available attack surface involved in a terminal interface and we should be on the lookout for, <i>and reject</i>, similar interfaces and applications.<p>In order for zmodem to work over the terminal, the terminal program itself needs to know something about the text flowing over the connection and then invoke special, extra routines based on monitoring that textual flow.<p>This opens up all manner of weird, extra attack surface.<p>The <i>beauty of the text terminal</i> is that I can, theoretically, <i>cat any file I want to</i> without fear of what it contains. I can open up (perhaps with 'strings' or 'hexedit') any email attachment without fear of the strings that it contains. I can do this because I am using a <i>dumb terminal</i>.<p>As soon as the terminal is smart - even a little bit - you've got vectors for weird strings doing things you don't want them to.
> There is something quite special about seeing ZMODEM transfers reach speeds close to 600 MBit/s. It's hard to explain.<p>Yep that's 1.5 million times the speed I used to get.
Kermit is still used in the embedded space, on modern platforms specifically for uboot.<p>zmodem can also be used in embedded spaces to retrieve files if the only interface is a serial port.
Still would love if desktop terminal emulators would implement the zmodem receiver side, so that you can ssh into some host of your choice and just type "sz" to copy arbitrary files of your choice onto your local system.
I never thought, I'd read again about ZMODEM and Kermit. To learn programming and dive more into C/C++, I implemented both protocols while writing a Windows application to transfer files from the PC to a HP48 graphics calculator over the serial port in ca. 1999. This app then became the "official" PC link program "HPComm", released under the GPL. Almost 25 years go... :-o<p><a href="https://hpcomm.sourceforge.net/index-old.html" rel="nofollow">https://hpcomm.sourceforge.net/index-old.html</a>
Thankfully, ZModem existed. I’d never been able to use Kermit successfully back in the days, always had trouble with it. I even had more success with XModem.
Interesting, I used kermet on Coherent to dial into work. Once I started it, work would call be back so I would not have to pay for the session on my phone bill.
At my last job, I worked in the PCI cardholder data environment, and we were very careful to limit egress from our systems in order to make it hard to exfiltrate data in the unlikely event of a breach. I remember thinking, if I were a wily hacker and I managed to pop a shell on one of these hosts, I would not be deterred by network egress roadblocks. I'd figure out a way to get `sz` on to a host and exfiltrate data to my heart's content with ZMODEM like we did back in the day.<p>Looks like it's still quite possible, I wonder if our network monitoring tools would have noticed gigabytes of data flowing out of the network that way.
lrzsz is one of the first packages i install when configuring a new system. being able to send and receive files between remote and local without needing a separate ssh session is such a time saver. it's really fast as well. i do wonder if anyone has developed something more modern to make it even more performant?
I still miss sz and rz when I ssh from a computer with no ssh server like nearly every windows box. If I remember right, sz = send a file from the server I'm in back to the client server. rz = receive a file from the client server.<p>You can accomplish the with a new scp session on the client server, but it's an extra step. I use this as a helper when for building the scp command.<p>function scppath() {
echo $USER@$(hostname).$(dnsdomainname):$(realpath $1)
]
I remember having to deal with Kermit on the dialup line to the university. The connection wasn't 8-bit clean and IIRC XON/XOFF wouldn't work either on their modem, so it was very finicky and flaky whenever you wanted to transfer something.<p>Aren't brains amazing, storing all those ancient unused acronyms for decades?
Here's an ugly script to do zmodem over an SSH connection: <a href="https://github.com/ThomasHabets/ssh-scripts">https://github.com/ThomasHabets/ssh-scripts</a><p>Should work through multiple SSH hops, and not giving the hassle of using scp through those same sets of hops.
While it's nice to use a version of Kermit or Zmodem that has SSH built into it, it's not necessary. The plain vanilla versions from decades ago will work just fine in any terminal connection you establish: Telnet, SSH, rsh, whatever - even 7-bit ASCII...<p>I used this frequently to move files back in the dialup modem days, after doing an ugly redirect to get the Zmodem binary on the far end, and because of its superior compression, Zmodem was faster than uucp/uucico (when you were lucky enough to have the uucp suite installed and configured, which unlike Kermit and Zmodem, required root privileges...)
i wrote implementations of the kermit protocol (and vt100 terminal emulators) for z80 cp/m machines and for the 6502-based BBC micro (both purely in assembler) way back in the mid 1980s. it was fun, and the protocol was really well documented, unlike some others i've had to deal with (i'm looking at you DDE & CORBA). oh, happy times! a bit later i wrote an implementation in C (and a bit of assembler for the interrupt-driven i/o) for the ibm pc.
Project for the future: write an Arduino sketch which will send its own (compressed) source code using one of these protocols over the serial interface.
zmodem... that brings be back to my BBS days when I had a fido node 2:281/909.4. why do I still know that by heart ? playing glorious BBS door-games over 2400 baud :)