I know I can install Samba or openssh-server to be able to share files between two Ubuntu computers. Is there a way to share files without installing additional packages?
I installed Ubuntu on two systems on the same LAN, but without Internet connectivity. I found that my usual way of transferring files (scp) failed because openssh-server was not installed on either system. Using Personal File Sharing was impossible without installing extra packages. I ended up using netcat to transfer, which is suboptimal and not intuitive for the average user.
So I'd like to know if anyone knows of a way to do this with out-of-the-box Ubuntu installations (or at least, with packages available in the Ubuntu desktop CD).
Thanks!
You can move to a given directory with
cd
, then serve the current directory as a web server with the command:On the other machine go to the address
http://server-ip:8000/
where "server-ip" is what you see when you do "ifconfig" on the source computer, under "inet addr:". For example, if the output of ifconfig on the source computer starts like this:
then on the target computer, you should point the browser to:
if you want something faster that python's
SimpleHTTPServer
module (which is awesome and is most simple way imho), you can use netcat (nc
utility) - it's using raw TCP so you won't be having overhead that comes with HTTP protocol.For example if you are trying to copy file
config.xml
from host germany.local to host france.local (both running ubuntu), you need to follow these steps:on target host france.local run:
(it will start nc process that listens on the port 7000 for incoming data and writes said data to file
copied_config.xml
)on source host germany.local run:
That's all!
Also, you can check this helpful howto for more in depth instructions