All I want is a way to transfer files. (Although my FreeDOS machine has a floppy, almost none of the other machines I work with in this day and age do, and floppies were horribly unreliable even in the best of worlds).
Initially I thought that setting up networking was going to be some labor of hercules effort to get set up. I was completely wrong, it is dead easy. Here is an outline to get you oriented:
The card I used was a 10baseT card based on the Digital 21041 chip, also known fondly as the "tulip" card.
C:\FDOS\drivers\net\crynwr\dc 0x60The 0x60 is apparently the software interrupt to be used by the packet driver.
Just to belabor the point, for anyone from a unix/linux background. In any unix/linux system, the network stack is part of the kernel and is shared by all applications. Things are totally and utterly different with WATTCP under dos. Here the only thing shared is the packet driver which is loaded once and for all at boot time. The network stack is linked into each and every WATTCP based application. This in fact works just fine given that DOS is not a multitasking OS and only one application is ever running at a time.
However, this also means that the Freedos machine will not repond to ping (since no network stack is loaded and running).
I scratched my head for some time wondering where to put this file. Apparently the idea is that this file is located in the same directory as the application (in my case ssh2dos) using it. This would be the directory C:\FDOS\BIN, so that is where it goes.
A minimal file might be:
my_ip=192.168.0.5 netmask=255.255.255.0A more sophisticated file might be:
my_ip=192.168.0.5 netmask=255.255.255.0 gateway=192.168.0.1 nameserver=128.97.111.3 nameserver=128.98.0.2If there was a ping utility included as part of FreeDOS, (although oddly enough there is not) it just might be wattcp based and reference this file.
Heading off on a tangent for just a moment. Somewhere it was suggested that you could define a variable in your autoexec.bat indicating where this configuration file is located. Something like:
SET WATTCP.CFG=C:\NET\WATTCP.CFGI tried this, but it did not work for me.
Note also, it is recommended that on a 386 chip or better, the ssh2d386 executable be used, although the ssh2dos executable certainly works.
Note that there are both sshdos and ssh2dos. The sshdos package uses protocol version 1.5 and is almost certainly not what you want (it won't run against the ssh servers on my linux machines). The ssh2dos package uses protocol version 2.0, which is what you want in this day and age. The claim is that the ssh2dos package includes ssh and scp (which I have found) as well as sftp and telnet clients (which I have yet to find, but see below).
Typical use:
ssh2dos user 192.168.0.4 ssh2dos -s password user 192.168.0.9 ssh2dos -t vt100 -v -n -g username servername ssh2d386 user 192.168.0.9The "-v" switch turns on verbose mode, so it tells you what it is doing when it is establishing a connection. You need to use IP numbers since you don't have a DNS service.
To copy files to my freedos computer I attempt to do:
scp2d386 user@server:file localfile scp2d386 -s password user@server:file localfileThese give the message "Protocol error: Expected control record". Some people have erroneously claimed that this is a problem with my server, which is spitting out some text due to commands in my .bashrc or some such. This is baloney. Any number of other ssh clients work just fine with my ssh server. And when I follow this advice and go to some lengths (via a .hushlogin file) to make my server silent it still fails.
A link to a recommended set of "fixed" packages (thanks to Geraldo Netto geraldo_boca_at_hotmail.com) is:
I fetched these (version 0.2.1) and they fix the problem! As a bonus, this package includes the sftp and telnet that do not seem to be included with FreeDOS 1.0Now if I could just find ping!! Rumor has it that the Wattcp-32 package includes ping, tcpinfo, and something like arp.
The scp2dos program is in C:\fdos\bin\scp2dos.exe On sourceforge (as of 9/2010) this seems to be up to versions 0.2.1 and the download is SshDosSockets.zip -- the trick though is how to get this onto my freedos machine without a working scp2dos program. :-(
To copy files from my freedos computer I do:
scp2d386 localfile user@server:file scp2d386 -s password localfile user@server:fileBoth of these commands work in either the 0.1.1 and 0.2.1 version without the above "control record" problem.
A very nice essay was written in 2007 by Ulrich Hansen. It was available at the this link, and I also have a local copy here. (It is a very good write up, and it would be a pity if it vanished).
Adventures in Computing / tom@mmto.org