How to Access Linux Laptop Files on Your Mobile via SFTP

Uttam MahataUttam Mahata
3 min read

Securely accessing your Linux laptop’s files from your mobile device can be efficiently done using SFTP (Secure File Transfer Protocol). Follow these steps to set up SFTP and connect your mobile device to your Linux laptop.

1. Set Up SFTP on Your Linux Laptop

First, ensure that your Linux laptop has an SSH server installed, as SFTP functionality is included with it.

  • Install OpenSSH Server: Open the terminal and install the OpenSSH server package with the following commands:

      sudo apt update
      sudo apt install openssh-server
    
  • Check if SSH Service is Running: Verify that the SSH service is running:

      sudo systemctl status ssh
    

    If the service is not active, start it by executing:

      sudo systemctl start ssh
    
  • Configure Firewall (Optional): If you have an active firewall, ensure SSH traffic is allowed:

      sudo ufw allow ssh
    

2. Find Your Linux Laptop’s IP Address

You need the laptop’s IP address to connect from your mobile device:

hostname -I

Take note of the IP address shown (e.g., 192.168.1.100).

3. Install an SFTP Client on Your Mobile Device

Download an SFTP client app on your mobile device. Recommended apps include:

  • Solid Explorer (Android)

  • File Manager by Cheetah Mobile (Android)

  • FE File Explorer (iOS and Android)

  • Termius (iOS and Android)

4. Connect to Your Linux Laptop from Your Mobile Device

  • Launch the SFTP client app on your mobile device.

  • Create a new SFTP connection with the following details:

    • Host/Server: Enter your Linux laptop’s IP address (e.g., 192.168.1.100)

    • Port: Default is 22

    • Username: Your Linux user’s name

    • Password: Your Linux user’s password (or set up SSH key authentication for added security)

  • Save the configuration and connect. You will now be able to browse your laptop’s file system, upload, download, and manage files directly from your mobile device.

5. Access Files via Termux (Optional)

If you prefer using Termux on your mobile device for an SSH session:

  • Install OpenSSH on Termux:

      pkg install openssh
    
  • Connect to your Linux laptop using:

      ssh username@<IP_ADDRESS>
    
  • Enter your password when prompted to access your files through the command line.

Tips for Enhanced Security:

  • Use SSH Key Authentication: This eliminates the need for password-based logins and enhances security. Generate an SSH key pair and add the public key to your Linux laptop.

  • Change the Default Port: Change the SSH listening port from 22 to a non-standard port to reduce exposure to brute-force attacks.

  • Strong Passwords: Always use a strong, unique password for your user account.

By following these steps, you can securely access and manage your Linux laptop’s files from your mobile device, enabling convenient file transfers and remote management.

0
Subscribe to my newsletter

Read articles from Uttam Mahata directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Uttam Mahata
Uttam Mahata

As an undergraduate student pursuing a Bachelor's degree in Computer Science and Technology at the Indian Institute of Engineering Science and Technology, Shibpur, I have developed a deep interest in data science, machine learning, and web development. I am actively seeking internship opportunities to gain hands-on experience and apply my skills in a formal, professional setting. Programming Languages: C/C++, Java, Python Web Development: HTML, CSS, Angular, JavaScript, TypeScript, PrimeNG, Bootstrap Technical Skills: Data Structures, Algorithms, Object-Oriented Programming, Data Science, MySQL, SpringBoot Version Control : Git Technical Interests: Data Science, Machine Learning, Web Development