Run a python one-liner webserver to grab files.
NOT TO BE USED AT PRODUCTIVE SYSTEMS! You have to read, understand and accept the disclaimer .
Sometimes one needs to access resources from a linux-machine, where you do not want to setup a permanent share of some kind.
As python is preinstalled at all relevant linux distros, one can make use of a basic built-in webserver to temporarily share files. It's enough to switch to a directory one needs to access at the host and run there:
python -m SimpleHTTPServer 8080
Note: you should not need - and try to avoid - to run the command using sudo, as this would make root being the owner of temporary webserver.
A short test using a web-browser at the host-machine should list the related files/folders for: http://localhost:8080
Using the IP (or a resolvable name) of the host-machine, adding the used port (8080) to the url http://<the-host-machine>:8080 will list files and subdirectories for downloaded the same way at the client.
To stop/interrupt the webserver, it's enough to press CTRL+C at the host-machine.
WARNING/HINT: the simple webserver will be exposed to all network interfaces. Thus it should NOT be used at machines being exposed to the internet.
If the firewall at the host-machine is blocking incoming connections, you could temporarily turn off the firewall, grab your files, and turn the firewall ON at the hostmachine again afterwards.
systemd firewalld service commands
#check firewall-state sudo systemctl status firewalld.service # turn firewall off sudo systemctl stop firewalld.service #turn firewall on sudo systemctl start firewalld.service
(older) ufw service commands
#check firewall-state sudo service uwf status # turn firewall off sudo service uwf stop #turn firewall on sudo service uwf start
Good luck - have fun.