If you need to copy files from a Linux computer to macOS desktop, this short tutorial will explain how using Arch Linux with Deepin 20 and Midnight Commander. Rather than using a Wi-Fi gateway such as a a router, we’ll connect Arch directly to macOS using the Personal Hotspot in Deepin 20 giving us an M2M connection.
This guide will assume you’re running Deepin.
Download Midnight Commander
Midnight Commander is a File Browser that works over SSH. It works entirely in the terminal and is perfect for transferring files using an SSH connection. Download it on your Linux machine. Download & install with sudo pacman -S mc.
You won’t need anything else to transfer files. And Midnight Commander supports a mouse so it’s very user friendly. Best of all it doesn’t require a GUI.
Start Personal Hotspot
Access Control Center > Network from Deepin Desktop and enable Personal Hotspot.
Click the + button to create a new hostpot. Set WPA/WPA2 Personal for Security, enter a password and fill in the SSID or hotspot name and Save your changes.
Once the hotspot is created toggle the Hotspot switch to activate it. This will disconnect you from Wi-Fi and start broadcasting the hotspot SSID.
Connect to the hotspot from your Mac.
Enable Remote Login on macOS
Once connected to your hotspot enable Remote Login on macOS. To do so open System Preferences > Sharing and check the box next to Remote Login as shown here:
Notice the SSH connection instructions:
Instead of host you want to use the IP address of the computer on the ad-hoc network. To get it hold option and click the Wi-Fi icon in the top bar. Under Preferred Networks in the dropdown you’ll see the IP address assigned ot the machine. Substitute the IP for the host when connecting, e.g.
Try connecting now from Terminal on your Linux box. Type yes when prompted to trust the host. And enter your Mac account password to finish connecting.
Once you’ve verified you can connect, exit the SSH connection.
Copy Files with Midnight Commander
Run mc to start Midnight Commander on your Linux machine. You should see something that looks like this:
Click around on the screen. Notice you can use both the keyboard or the mouse in Midnight Commander. It’s very user friendly.
Notice the window is split into two; there’s a Left and a Right. Select one of the two from the top menu and choose Shell link… from the resulting dropdown.
Then enter sh://email@example.com into the connection dialog and press Enter. You’ll be prompted for a password just as when you connected before using ssh.
Now you should be looking at files on both file systems:
And you can move files back and forth at will. Your will. When you’re finished don’t forget to disable Remote Login on your Mac.