8

How do I transfer files between the host and the guest when using SunOS 4 under QEMU?
I have followed this guide: https://en.wikibooks.org/wiki/QEMU/SunOS_4.1.4
But when I try to rlogin or rcp, I get the following error:

$ sudo rlogin -l root localhost  
ssh: connect to host localhost port 22: Connection refused

$ sudo rcp test.txt localhost:  
ssh: connect to host localhost port 22: Connection refused lost connection

QEMU version: 2.10, SunOS version: 4.1.4, Ubuntu version (host): 16.04

  • Just out of curiosity, why would you try to run rlogin/rcp through sudo? – user Oct 10 '17 at 11:36
  • Why don't you use NFS ? Create a virtual net between the host and the dom and run nfs vers 3 over that. It is possible to configure the host firewall such that rpcbind is protected. – Stefan Skoglund Dec 20 '19 at 2:46
9

rlogin and rcp are considered to be somewhat obsolete nowadays and have been replaced by ssh and scp respectively, the first "s" standing fore "secure". The reason I am telling you this is that both ssh and scp connect to the sshd server via port 22. Coincidence? I think not. Your host system does not have a true rcp or rlogin and has instead aliased both commands to the ssh equivalent.

The reason it is like this is because ssh long ago replaced these two commands as the preferred method for remote log in and file transfer but somebody at Ubuntu decided that it would be better to alias rlogin and rcp instead of doing the right thing (which is just leave them uninstalled, so you know they are properly missing).

Apparently, Ubuntu has an rsh-client package that installs the real utilities. I don't know exactly how to install a package on Ubuntu, but it's probably something like

sudo apt-get install rsh-client

Once you have got into your SunOs guest an can upload files to it, the first thing you should do is install an ssh server so you can use the ssh tools properly.

| improve this answer | |
  • @RetroQuestion2017 Good news. Was my guess at the install command correct? – JeremyP Oct 9 '17 at 14:56
  • Yes, it worked. – RetroQuestion2017 Oct 10 '17 at 5:49
  • ssh on SunOS 4 .... i do have a machine which should be able to run sunos 4 but will sshd be anything but slow ... yes signing on will be slow and well current ssh depends on a rather large software stack which includes perl. Don't expect to be able to build a current perl on sunos4 ! – Stefan Skoglund Dec 20 '19 at 2:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.