How to Run an SFTP Server on GhostBSD XFCE

Here’s a quick guide to get an SFTP server up and running on GhostBSD.

Step 1: Install and Enable OpenSSH Server on GhostBSD

OpenSSH provides both SSH and SFTP services. It’s typically pre-installed on GhostBSD, but you can verify and install it if needed:

sudo pkg install openssh-portable

After installation, start the SSH daemon to enable incoming SSH/SFTP connections:

sudo service sshd start

To ensure the SSH service starts automatically at boot:

sudo sysrc sshd_enable="YES"

Step 2: Find Your GhostBSD Computer’s IP Address

To connect from other devices, you’ll need the local IP address of your GhostBSD machine. To find it, open a terminal and run:

ifconfig

Look for the IP address listed under the active network interface (typically em0re0, or wlan0). It will usually look like:

inet 192.168.x.x

This is the address you’ll use to connect via SFTP from another device on the same network.

Step 3: Connect from a Linux Computer Using GNOME Files

On my laptop running CachyOS GNOME Edition, I can access other computers via the file browser:

  1. Open GNOME Files.
  2. Go to Other Locations.
  3. In the Connect to Server field, enter:
sftp://192.168.x.x

Replace 192.168.x.x with the IP address you found in Step 2.

Step 4: Accessing Your Mac from Thunar File Manager

macOS does include built-in SFTP server functionality, it’s part of the SSH service. To connect to your Mac using SFTP, you first need to enable Remote Login on the Mac:

Enable SFTP Server on macOS

  1. On your Mac, go to System Settings > General > Sharing.
  2. Turn on Remote Login.
  3. This starts the SSH server, which includes SFTP support.

Connect from Thunar (Linux or BSD)

  1. Open Thunar File Manager.
  2. In the address bar, enter:
sftp://192.168.x.x

Replace 192.168.x.x with your Mac’s IP address.

  1. A popup will ask for your Mac password. Enter it to authenticate.
Screenshot showing SFTP login with Thunar XFCE. Demonstrates seamless remote file management over SSH.
Thunder File Manager accessing my Mac Studio

Final Note: Check Your Firewall Settings

For SFTP file transfers to work, your GhostBSD machine must allow incoming connections on port 22, which is the default port used by both SSH and SFTP. If this port is blocked by your firewall, other devices on your network won’t be able to connect.

Make sure your firewall configuration permits traffic on port 22, especially if you’re using pfipfw, or another firewall tool common on BSD systems.

If you’re unsure how to configure your firewall, refer to the GhostBSD Firewall tutorial for step-by-step guidance.

Leave a Reply

Your email address will not be published. Required fields are marked *