If you ever want to transfer a large amount of data to a linux computer and are missing the more reliable wired options to do so, you can set up an SSH server and transfer your data to the Linux computer over an ad-hoc wireless network.
OpenSSH Server and Firewall settings
First, we prepare the Linux computer to receive the data inload.
We install the SSH server on the computer. Assuming you are on a debian based distribution, you can install it via APT.
$sudo apt install openssh-server
We also need to open access to port 22, which is the default port for SSH communication. You can either just open access to port 22, or just temporarily disable firewall.
$sudo ufw allow 22; sudo ufw enable
WARNING: If you disable the firewall, remember to enable it immediately afterwards. And don’t use your internet while the firewall is down!
Setting up the wireless network
We are going set up the linux computer as something of a Wi-Fi router. Open up the Network settings program. Turn on your laptop’s WiFi, and select “Use as hotspot”.
Fill in the details, and remember the password you entered.
Connect your old computer computer to your newly created wireless network.
Note the IP address of your new computer. It can be found by going back to Network settings program on the Linux computer, and clicking the gear icon next to your hotspot’s name.
Transferring your Data
We now transfer your data to your new laptop using an SSH connection. If the old computer is running Linux,
rsync is your friend. If running Windows, you can try using WinSCP.
Using rsync, the command syntax is as follows. Replace
username with your Linux user name, and
ip.address with the IP Address of your Linux computer.
$rsync -avzhP /path/to/source/folder firstname.lastname@example.org:/path/to/destination
For WinSCP, you get access to a GUI. Enter your Linux computer’s IP address in Hostname. Enter your Linux user name and password as the login information. For the protocol, select
Simply drag and drop files from one pane to another to migrate your data!