TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Fun with Kermit and ZMODEM over SSH

151 点作者 fcambus大约 2 年前

29 条评论

jerf大约 2 年前
Hello! Thank you for starting me up! I&#x27;m the Kermit protocol and I&#x27;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&#x27;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&#x27;s transfer another file, come on man, I want to ride again, please ple<p><pre><code> EXECUTION COMPLETED $</code></pre>
评论 #35707854 未加载
评论 #35703890 未加载
NoZebra120vClip大约 2 年前
How I contributed to Emacs<p>Once when I should&#x27;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&#x27;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&#x2F;evangelist. (Since then, I have seen the light of vim&#x27;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&#x27;s all for the best!
bm3719大约 2 年前
My only source of internet in undergrad was dialing into my university&#x27;s modem pool and getting a shell on the main server (a DEC Alpha running OSF&#x2F;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&#x27;d want to see, so I&#x27;d view source to get the img URL and then download that to &#x2F;tmp and transfer the file to my local machine via zmodem. Usually, it wouldn&#x27;t be worth the effort. I&#x27;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.
评论 #35703986 未加载
评论 #35704462 未加载
评论 #35705499 未加载
评论 #35709408 未加载
mikecoles大约 2 年前
The article mentions &#x27;Terminate&#x27;. That software was a joy to use.<p><a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;19980627010642&#x2F;http:&#x2F;&#x2F;www.terminate.com&#x2F;tour&#x2F;tour-setup.html" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;19980627010642&#x2F;http:&#x2F;&#x2F;www.termin...</a>
评论 #35703720 未加载
评论 #35703704 未加载
评论 #35703737 未加载
评论 #35704113 未加载
评论 #35703771 未加载
glonq大约 2 年前
Last year we implemented &quot;ymodem over BLE&quot; for reasons that are complicated and possibly stupid.<p>It felt familiar but strange and wrong to do such a thing. Worked great though.
评论 #35704948 未加载
rsync大约 2 年前
So, on the one hand ...<p>I have actually used &#x27;sz&#x27; and &#x27;rz&#x27; 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&#x27;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 &#x27;strings&#x27; or &#x27;hexedit&#x27;) 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&#x27;ve got vectors for weird strings doing things you don&#x27;t want them to.
评论 #35706320 未加载
评论 #35708179 未加载
diydsp大约 2 年前
&gt; There is something quite special about seeing ZMODEM transfers reach speeds close to 600 MBit&#x2F;s. It&#x27;s hard to explain.<p>Yep that&#x27;s 1.5 million times the speed I used to get.
jebr224大约 2 年前
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.
评论 #35704216 未加载
poettering大约 2 年前
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 &quot;sz&quot; to copy arbitrary files of your choice onto your local system.
评论 #35706708 未加载
评论 #35709103 未加载
评论 #35710001 未加载
ractive大约 2 年前
I never thought, I&#x27;d read again about ZMODEM and Kermit. To learn programming and dive more into C&#x2F;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 &quot;official&quot; PC link program &quot;HPComm&quot;, released under the GPL. Almost 25 years go... :-o<p><a href="https:&#x2F;&#x2F;hpcomm.sourceforge.net&#x2F;index-old.html" rel="nofollow">https:&#x2F;&#x2F;hpcomm.sourceforge.net&#x2F;index-old.html</a>
评论 #35709698 未加载
sedatk大约 2 年前
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.
评论 #35704129 未加载
评论 #35704077 未加载
jmclnx大约 2 年前
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.
spudlyo大约 2 年前
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&#x27;d figure out a way to get `sz` on to a host and exfiltrate data to my heart&#x27;s content with ZMODEM like we did back in the day.<p>Looks like it&#x27;s still quite possible, I wonder if our network monitoring tools would have noticed gigabytes of data flowing out of the network that way.
评论 #35704804 未加载
distantsounds大约 2 年前
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&#x27;s really fast as well. i do wonder if anyone has developed something more modern to make it even more performant?
评论 #35706323 未加载
评论 #35706022 未加载
seanmceligot大约 2 年前
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&#x27;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&#x27;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) ]
评论 #35705318 未加载
评论 #35704741 未加载
Tepix大约 2 年前
I remember having to deal with Kermit on the dialup line to the university. The connection wasn&#x27;t 8-bit clean and IIRC XON&#x2F;XOFF wouldn&#x27;t work either on their modem, so it was very finicky and flaky whenever you wanted to transfer something.<p>Aren&#x27;t brains amazing, storing all those ancient unused acronyms for decades?
thomashabets2大约 2 年前
Here&#x27;s an ugly script to do zmodem over an SSH connection: <a href="https:&#x2F;&#x2F;github.com&#x2F;ThomasHabets&#x2F;ssh-scripts">https:&#x2F;&#x2F;github.com&#x2F;ThomasHabets&#x2F;ssh-scripts</a><p>Should work through multiple SSH hops, and not giving the hassle of using scp through those same sets of hops.
dublin大约 2 年前
While it&#x27;s nice to use a version of Kermit or Zmodem that has SSH built into it, it&#x27;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&#x2F;uucico (when you were lucky enough to have the uucp suite installed and configured, which unlike Kermit and Zmodem, required root privileges...)
knorker大约 2 年前
I tried to sell the OpenSSH team on implementing inline file transfer with zmodem once, but they were not interested.
评论 #35707336 未加载
jedberg大约 2 年前
Kermit and ZMODEM, now that takes me back. Haven&#x27;t thought about those protocols for a <i>long</i> time.
pimlottc大约 2 年前
This is great! Just make sure you upload something as well to keep your ratio intact.
zabzonk大约 2 年前
i wrote implementations of the kermit protocol (and vt100 terminal emulators) for z80 cp&#x2F;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&#x27;ve had to deal with (i&#x27;m looking at you DDE &amp; CORBA). oh, happy times! a bit later i wrote an implementation in C (and a bit of assembler for the interrupt-driven i&#x2F;o) for the ibm pc.
marcodiego大约 2 年前
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.
评论 #35703840 未加载
ezekiel68大约 2 年前
Man 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.
tech-no-logical大约 2 年前
zmodem... that brings be back to my BBS days when I had a fido node 2:281&#x2F;909.4. why do I still know that by heart ? playing glorious BBS door-games over 2400 baud :)
thrownaway561大约 2 年前
LOL... The good old days of writing modem strings for OS&#x2F;2.
johng大约 2 年前
HS&#x2F;Link was the pinnacle during my modem days.
Jemm大约 2 年前
Compuserve wants their cool back.
YesThatTom2大约 2 年前
sz and rz! Such good memories.
评论 #35705490 未加载