Run SFTP without shell access on Ubuntu 20.04
The tutorial below describes how to get SFTP running without shell access on Ubuntu 20.04
We will do the whole thing by issuing a few commands in the console.
First, we add a user:
1 | sudo adduser pliki |
We create a directory for storing files and give permissions:
1 | sudo mkdir -p /var/sftp/uploads |
1 | sudo chown root:root /var/sftp |
1 | sudo chmod 755 /var/sftp |
We give the user access to the files and directory with files:
1 | sudo chown pliki:pliki /var/sftp/uploads |
We edit the ssh configuration file:
1 | sudo nano /etc/ssh/sshd_config |
And we add at the end:
1 2 3 4 5 6 7 8 | Match User pliki ForceCommand internal-sftp PasswordAuthentication yes ChrootDirectory /var/sftp PermitTunnel no AllowAgentForwarding no AllowTcpForwarding no X11Forwarding no |
Save the file and restart sshd
1 | systemctl restart sshd |
Everything should work, that's all 🙂
Related entries:
Code 19.04 dl.winehq.org/wine-builds/winehq.key 20.04 oraz Ubuntu 21.04
Debian Update 10 to Debian 11
Installing the on-screen keyboard on Ubuntu systems / Debian / Linux Mint
gconf-service gconf-service-backend gconf2-common libappindicator1 libc++1 libc++1-9 libc++abi1-9 libdbusmenu-gtk4 libgail-common libgail18 libgconf-2-4 libgtk2.0-0 libgtk2.0-bin libgtk2.0-commonAll-in-one voice and text chat for gamers
All-in-one voice and text chat for gamers that's free 22.04
gThumb Installation in Ubuntu 20.04