17 ms·
Fun with Kermit and ZMODEM over SSH
- jmclnx 3y agoInteresting, 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.
- mikecoles 3y agoThe article mentions 'Terminate'. That software was a joy to use. https://web.archive.org/web/19980627010642/http://www.terminate.com/tour/tour-setup.html https://web.archive.org/web/19980627010642/http://www.termin...
- johnturek 3y agoWow. I miss those days. Back when life was simple. I really wish my kids could experience working with TSR dos programs, and being intentional of what you are trying to do with a computer. Every k mattered back then.
- rikthevik 3y agoYeah, Terminate was a big step up from Telix. Wow that takes me back.
- 31337Logic 3y agoI used both of those, as well as ProComm Plus (PCPLUS.EXE). Thanks for the trip down memory lane!!!
- sakesun 3y agoI used all those as well. But I also learned that many experts on the BBSes use Commo. I'm too young to appreciate complexity of Commo at that time.
- sakesun 3y agoOh wait. There's Telemate as well. My all time favorite.
- 31337Logic 3y agoCommo and TeleMate!! That's right! I think I just found my long lost brother! :-) Thanks again. (And yes, TeleMate was my favorite too. I remember it came on 4 x 1.44MB floppies and had a kick-ass scripting language. It was all about the macros and automation back then!)
- mikecoles 3y agoChecking up on other old favorites such as BitchX/irssi and slrn, I found they're still being developed: slrn --- NNTP/spool-based Usenet newsreader last updated: 2023-03-18T04:31:51 [UTC] repository: git://git.jedsoft.org/git/slrn.git tarfile: slrn-pre1.0.4-9.tar.gz ( size: 1563860 bytes; md5: f193d983e104a82ef4fd70b1037f8b60 ) github: https://github.com/jedsoft/slrn https://github.com/jedsoft/slrn https://github.com/BitchX/BitchX1.3 https://github.com/BitchX/BitchX1.3 https://irssi.org/2023/03/31/irssi-1.4.4-released/ https://irssi.org/2023/03/31/irssi-1.4.4-released/
- anthk 3y agoI use SLRN daily.
- blueflow 3y agoI'm using irssi right now! There are still active irc communities.
- knorker 3y agoIRC is still alive. I have irssi on a monitor on the side all the time, both for friends and work. IRC is not as big as it used to be, but at its highest it was mainstream even for computer illiterates.
- icedchai 3y agoI still use slrn. In the old days, I used tin! Also, I use mutt for one of my old email accounts (used to use elm...)
- sedatk 3y agoI even remember its creator’s name: Bo Bendsten. I hope he’s doing okay.
- bananaboy 3y agoI tried to track him down a few years ago so I could register my (previously pirated) copy of terminate. I figured better late than never. But I couldn’t find him. I recall that there were some shenanigans with the sale of the company. I think there’s some messages floating around on newsgroups and around the place about it. I found this https://paste.ee/p/Z0ywP https://paste.ee/p/Z0ywP
- sedatk 3y agoInteresting. Thanks for the link. I remember using a Russian clone called “Terminator” which looked way more polished than Terminate, but don’t know if it’s related to this controversy. EDIT: Oh! I found it and installed it from https://www.sac.sk/files.php?d=3&l= https://www.sac.sk/files.php?d=3&l= . Apparently, Terminator isn't a Russian clone like I remembered, but actually the successor to Terminate written by George Collins.
- bananaboy 3y agoWow! I had no idea about Terminator! It would be fascinating to hear about what happened from Bo's perspective. edit: this thread has some more info https://groups.google.com/g/comp.dcom.modems/c/JdOtiDGCV3Y https://groups.google.com/g/comp.dcom.modems/c/JdOtiDGCV3Y There's one person in the thread who is skeptical that Bo was in the wrong!
- sedatk 3y agoWell, that was a rabbit hole to go in. I see that Bo had made no attempt to explain the situation to his followers over the years which isn't in his favor.
- myth_drannon 3y agoThe swiss knife of BBSing... it even had a Cost Manager that I used, so my parents won't kill me because of high phone bills.
- jerf 3y agoHello! Thank you for starting me up! I'm the Kermit protocol and I'm happy to hel... wait, you want to transfer what file? What the hell is a gigabyte? 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 ooooooo whooooooo OOOOOOOOO AAAAAAAAAAAAAAA !!!!!!!!!!1!! qcjqrjrcorRC!!! WHAT THE HECK WAS THAT? Did I just do megabytes per second? Holy shit. Am I high or something? What is this hardware? What is going on here? 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 EXECUTION COMPLETED $
- yjftsjthsd-h 3y agoThanks for the laugh (but also kind of serious) - reminds me of https://xkcd.com/2221/ https://xkcd.com/2221/ (what a fast floppy drive you have!)
- Sohcahtoa82 3y agoNow I'm wondering if there's ever been emulated software that crashed because it tried to calculate a data transfer rate, but the emulator transferred the data faster than the delta in the time measuring in the emulated machine, so it divided by zero.
- jerf 3y agoWell, certainly a lot of people running older software have had the joy of their disk size being larger than the software can handle. There's plenty of software that expects the disk size in bytes to fit into an signed or unsigned 32-bit int. I also don't know about data transfer rates but if you want to emulate the really old stuff in DOSBox, you'll need to carefully examine pages like https://www.dosbox.com/wiki/Performance https://www.dosbox.com/wiki/Performance because there are plenty of games that do a divide-by-zero crash when they're trying to time the CPU for running at the desired speed.
- LeoPanthera 3y ago
- marcodiego 3y agoProject for the future: write an Arduino sketch which will send its own (compressed) source code using one of these protocols over the serial interface.
- rcfox 3y agoA telequine?
- glonq 3y agoLast year we implemented "ymodem over BLE" for reasons that are complicated and possibly stupid. It felt familiar but strange and wrong to do such a thing. Worked great though.
- jhallenworld 3y agoI still use these protocols for embedded systems. There is almost always a CLI on a UART, so one should be able to transfer files. Ymodem is simpler and smaller than Zmodem, but we've used both. I've used Zmodem at 921600 baud, but it needs fairly large buffers (for a UART) to work. One of the big advantages is that TeraTerm for Windows exists, and supports xyzmodem. It means that I often don't have to write any host-side software for things like firmware update, and more important, don't have to touch Windows.
- kevin_thibedeau 3y agoA former employer still insists on using Xmodem-1K even though Ymodem is almost the same and provides so many quality of life improvements with the header block. It was endlessly annoying to have to manually tell the receiving end the file size and name when a simple upgrade would obviate the need.
- tonyarkles 3y ago> I still use these protocols for embedded systems I have a brand new system sitting here next to me on the bench that uses SLIP framing for packetizing Protobufs :)
- bm3719 3y agoMy 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. 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.
- defaultcompany 3y agoThis reminded me that I used to view images over my dialup connection directly in the terminal by catting the image to pbmtoascii and making my terminal font 1 pixel high. It wasn't exactly pretty but it worked.
- stuff4ben 3y agoLOL!! I thought I was the only person who did this. Back in the mid-90's I did the same thing. One day I was feeling a bit randy and decided to visit a certain centerfold magazine website and download some images that way.
- devilbunny 3y agoOne summer, I had access to a local university's Ultrix machine (on 4.2 BSD) via dialup. The connection was 7E1, so Zmodem was out. But I could uuencode into a big buffer on my terminal program and uudecode locally.
- ronsor 3y agoYou might have been interested in SLiRP[0] at the time. [0] https://en.wikipedia.org/wiki/Slirp https://en.wikipedia.org/wiki/Slirp
- sedatk 3y agoThankfully, 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.
- Koshkin 3y agoMy recent experience reviving an old DOS laptop with a serial port is consistent with this.
- themodelplumber 3y agoJumping from Kermit to ZModem was quite a revelation for this Muppets fan. I was so sad to find I'd been needlessly reducing my download speed just by going with the fuzzy green frog, when presented with all of the different download options.
- myself248 3y agoWhat gets me is that ZModem-Resume had effective continuation of failed transfers _decades_ before HTTP got it right. The early days of the web drove me bonkers, having to start over with a long file that failed in the middle.
- Sohcahtoa82 3y agoI remember using a program...I forget what it was called, but it was popular in the 56K days for resuming HTTP downloads. It would even allow you to provide mirror URLs so you could download from multiple sources at once. I want to say it was called WinGet, but now there's something else called that, so I can't confirm it. EDIT: It was called GetRight.
- blueflow 3y ago> before HTTP got it right In the spec, yes. But since servers use Content-Encoding instead of Transfer-Encoding for on-the-fly compression, its unspecified now whether the byte offsets in the resumption refer to the compressed or uncompressed file. Result: Download resumption did not work reliably and got removed from browsers.
- jedberg 3y agoKermit and ZMODEM, now that takes me back. Haven't thought about those protocols for a long time.
- Tepix 3y agoI 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. Aren't brains amazing, storing all those ancient unused acronyms for decades?
- thrownaway561 3y agoLOL... The good old days of writing modem strings for OS/2.
- jebr224 3y agoKermit is still used in the embedded space, on modern platforms specifically for uboot. zmodem can also be used in embedded spaces to retrieve files if the only interface is a serial port.
- jabbany 3y agoThis! I still recall using zmodem not that long ago for this exact purpose of sending firmware blobs over just a serial connection.
- waste_monk 3y agoWe have switches purchased in the last few years that use zmodem for firmware upload and recovery. Annoyingly it still supports a maximum of 115200 baud, even though the serial port on the switch is physically USB-C, so on the one occasion we had a switch brick itself and had to use zmodem "in anger" it took quite a long time to upload the replacement firmware.
- seanmceligot 3y agoI 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. 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. function scppath() { echo $USER@$(hostname).$(dnsdomainname):$(realpath $1) ]
- deleted 3y ago[deleted]
- kej 3y agoThere's a "zssh" project that wraps an SSH session with ZModem handling, but it would be neat to see a tool like that this didn't require sz and rz installed. [0] https://zssh.sourceforge.net/ https://zssh.sourceforge.net/
- YesThatTom2 3y agosz and rz! Such good memories.
- geocrasher 3y agoI came here to say this. I still think rz and sz should be supported everywhere. Even now, I can't tell you how many times I wish I could grab a file straight form the terminal. We lost something when we stopped using zmodem. (and for the record, yes, I do know about all the other things that aren't saving a file direct from the terminal)
- nrclark 3y agoOn the off-chance that your use-case is "minicom to some Linux serial-console", you might be surprised to learn that minicom has rz/sz support built right into it! Assuming that your remote device has lrzsz installed, you can copy files right through your terminal, exactly like you're describing. It's certainly not the fastest transfer-rate, but it's handy in a pinch.
- pimlottc 3y agoThis is great! Just make sure you upload something as well to keep your ratio intact.
- spudlyo 3y agoAt 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. 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.
- yjftsjthsd-h 3y ago> 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. Probably as easy as `cat > sz` and then paste it over the wire? Maybe run through base64 first. Although actually depending on the situation you might be able to just do that directly and not bother with this? Like just as a super simple non-scientific test: $ ssh someserver cat /bin/ls > ./test-ls $ ssh someserver md5sum /bin/ls ; md5sum ./test-ls b3535289b2932e25650074aa6d89bf3c /bin/ls b3535289b2932e25650074aa6d89bf3c ./test-ls That looks to work.
- jerf 3y agoA related trick that can be actually useful is tar'ing on one side and untar'ing on the other: https://unix.stackexchange.com/questions/19804/compress-a-directory-using-tar-gz-over-ssh-to-local-computer https://unix.stackexchange.com/questions/19804/compress-a-di... scp is miserably slow on transferring lots of small files and this can be wildly faster, plus you get your choice of compression program based on what is on each side of the connection and what the bandwidth vs. CPU is.
- dublin 3y agoIn the early days of Unix (before rcp was a given), tar pipelines were a common way of moving ) from one machine to another on the network. It was a little nicer than FTP, not only because it didn't need an admin to set up the FT server, but also because you could transfer the files to any directory that you could cd to and had write access to. (And of course, tar made it easy to send a bunch of files and directories at once, too...)
- zabzonk 3y agoi 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.
- poettering 3y agoStill 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.
- anthk 3y agoJust use sshfs, or rclone mount, and use the old cp -r to get your files. MC can connect to ssh/ftps too, and you can copy files and dirs from pane to pane.
- mbreese 3y agoIt’s just not the same as having transfers available on the remote command line. I have a program I wrote that maintains a local server with a port forwarded over SSH. Then on the remote side I have a client program that sends a file(s) (or folder) back to my local computer. It can either save the file or open it, depending on the command I ran. This type of automatic transfer makes it very convenient to generate figures on a server (where the data lives) and then view them locally. It’s a much better workflow than having to use sshfs or scp. What I wrote is really quite similar to an old transfer program like zmodem with the added feature of auto opening a file if I choose.
- anthk 3y agoOnce you mount everything as local with rclone, transferring protocols have no sense, everything should be part of a filesystem. Plan9 did it right, there's no difference between local and remote once you get the grasps of 'bind'.
- mbreese 3y agoBut if the analysis programs are in a different server or you don’t want to transfer 100s of GB of data to the local machine for processing, you still want to have the ability to selectively transfer individual files. It doesn’t matter if you mount a remote server locally… unless your data is of a trivial size, you still want to do the processing remotely. I see this as a theory vs practice difference. In theory having one unified file system is great and the way to go. In practice… there are issues.
- distantsounds 3y agolrzsz 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?
- svennek 3y agohow do you do that, also through qodem or ?
- somat 3y agoI have used bare netcat to transfer files. works well enough when the link is good, when it's not... Well I suspect that is when you dig out better tools. nc -l 1234 > fname nc host 1234 < fname
- anthk 3y agohttps://www.complete.org/nncp/ https://www.complete.org/nncp/ It supports flakey networks and it has tons of features.
- johng 3y agoHS/Link was the pinnacle during my modem days.
- rsync 3y agoSo, on the one hand ... I have actually used 'sz' and 'rz' in relatively modern times for quick and dirty file transfer and found it very convenient in a very narrow set of use-cases. However ... 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, and reject, similar interfaces and applications. 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. This opens up all manner of weird, extra attack surface. The beauty of the text terminal is that I can, theoretically, cat any file I want to 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 dumb terminal. 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.
- blueflow 3y agoI have bad news for you. Do you know what (n)curses is for? Its basically a library for those magic strings (and ascii control characters) that run extra routines in the terminal. And every terminal has these routines.
- mbreese 3y agoAs I see it, the parent is specifically worried about the terminal needing to monitor input and fork a process in response. Control character handling should be pretty robust (or worst-case, a NOP). Curses-based programs read/write specific control characters to move the cursor, etc (really any tty should support control characters). But they don’t fork a new process… (unless I’m very mistaken).
- blueflow 3y agoSee xterm manpage, "printerCommand" or urxvt manpage, "print-pipe". They may be triggered remotely by the media copy commands. Good news is, this is supposed to be disabled per default.
- tech-no-logical 3y agozmodem... 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 :)
- ractive 3y agoI 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 https://hpcomm.sourceforge.net/index-old.html https://hpcomm.sourceforge.net/index-old.html
- whartung 3y agoKermit was a hidden gem on the HP-48. Company I was doing work for was looking at handheld solutions for on site data collection. One of the things they were looking at was something from Symbol. Nice unit, but, $2k a pop. I was out visiting my father who happened to have an HP-48, which I had not seen before. Fiddling with it I managed to learn quite a bit about its (now legendary) capabilities. But I was quite surprised to learn it had a serial port and support for Kermit. Returning home, I bought one and quickly prototyped a solution for the company, where they’d upload the data from the calculators each day straight to the HP-9000 via Kermit. You could buy the HP-48 base model for $100, and they ran forever on AAA batteries. We ended up rolling out the project and they bought a dozen of them. That was a really fun project. I coded much of the calculator code lying in bed.
- knorker 3y agoI tried to sell the OpenSSH team on implementing inline file transfer with zmodem once, but they were not interested.
- nvahalik 3y agoIf there is one thing I've hankered for more often than not... it's been the ability to send a file over my existing SSH connection. Why this isn't something that isn't supported out of the box is beyond me. Doesn't SSH have a control channel? Couldn't it support this without text mode hacks?
- knorker 3y agoSSH has both control channels and escape codes. They could add this to the \n~? codes.
- diydsp 3y ago> There is something quite special about seeing ZMODEM transfers reach speeds close to 600 MBit/s. It's hard to explain. Yep that's 1.5 million times the speed I used to get.
- thomashabets2 3y agoHere's an ugly script to do zmodem over an SSH connection: https://github.com/ThomasHabets/ssh-scripts https://github.com/ThomasHabets/ssh-scripts Should work through multiple SSH hops, and not giving the hassle of using scp through those same sets of hops.
- deleted 3y ago[deleted]
- NoZebra120vClip 3y agoHow I contributed to Emacs 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. 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.) 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! 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. 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. 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!
- dublin 3y agoWhile 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... 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...)
- ezekiel68 3y agoMan this title takes me way back. Of course, ymodem-g on an HST was faster. But hard to beat the auto-resume feature of zmodem.
- Jemm 3y agoCompuserve wants their cool back.