How to Install OpenSSH SFTP Server on Fedora CoreOS

This tutorial will guide you through the installation process of OpenSSH SFTP server on Fedora CoreOS.

Prerequisites

Before you begin, you will need the following:

Step 1: Install OpenSSH Server

First, you need to install the OpenSSH server package on your Fedora CoreOS Latest machine. You can do this using the following command:

sudo rpm-ostree install openssh-server

Step 2: Configure SSH

Once OpenSSH server is installed, you need to configure it to allow SFTP connections. You can do this by editing the SSH daemon configuration file.

sudo nano /etc/ssh/sshd_config

Add the following lines at the end of the file:

Subsystem sftp internal-sftp
Match Group sftp
ChrootDirectory /home/%u
ForceCommand internal-sftp
X11Forwarding no
AllowTcpForwarding no

Save and close the file.

Step 3: Create SFTP Group and User

Next, you need to create a new group for SFTP users and add the users to it.

sudo groupadd sftp
sudo useradd -m -s /sbin/nologin -g sftp sftp-user

Step 4: Set SFTP User Password

Set a password for the SFTP user.

sudo passwd sftp-user

Step 5: Restart SSH Service

Finally, you need to restart the SSH service to apply the changes.

sudo systemctl restart sshd

Conclusion

In this tutorial, you learned how to install OpenSSH SFTP server on Fedora CoreOS Latest and configure it to allow SFTP connections. You also created a new SFTP user and added it to the SFTP group. With these steps completed, you can now use your Fedora CoreOS Latest machine as an SFTP server.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!