Connection to FTP Server on Ubuntu 21.04 Minimal
- For the VM to work, you need to open port 21(TCP), 22(TCP), 50000-51000(TCP) in the network properties in Azure Firefall.
- Install PuTTY. You can download PuTTY from the link – https://putty.org.ru/download.html Launch PuTTY.
- In the “Host Name” field, enter the IP of the virtual machine and click “Open”.
- In the window that appears, click Accept.
- Enter the username and password that was used to create the virtual machine.
(If you enter a password, it will not be displayed.)
- To create a new user use the command
sudo useradd -m user name
Where username is the name that the user comes up with
- To create a password, use the command
sudo passwd user name
Where username this is the ftp user created in the previous step
Important: When entering a password for security purposes, it will not be displayed, also password has to be a maximum of 8 characters. If you enter a password with more than 8 characters, it will be shortened. While entering a password in the FTP client, only the first 8 characters will be taken.
- Then you need to enter the command in the console that opens the configuration file:
sudo nano /etc/vsftpd/vsftpd.conf
And add the following information there
Where xxx.xxx.xxx.xxx The public ip address of this vm.
And YYYYY – Unprivileged ports (Must be allowed in VM security group).
- In order to save the information, press Ctrl + X, then Enter
Connection with Filezilla client
- Now, for further connection, you need to install “FileZilla Client”
You can download it from the link: https://filezilla-project.org/download.php?platform=win64
- In the “Host” field, enter the IP of your VM
In the “Username” and “Password” fields, enter the data that you entered when creating a new user (see step 7)
In the “Port” field, enter 22
And click “Quickonnect”
- The examples of the basic ftp user management commands that can be entered after connecting in the PuTTY client:
The changing of the password for an existing user:
sudo passwd username
The deletion of user:
sudo userdel username
The blocking of user account: (works only for password login)
sudo usermod -L username
The unblocking of user account:(works only for password login)
sudo usermod -U username