Configuration and connection to the OpenSSH FTP Server on Ubuntu server 20.04
To work, you should open port 22 (TCP) in the network properties in the Amazon firewall. After purchasing and starting the VM you should know its IP address. You can find it in the personal account of Amazon.
To connect to the Server, you should generate a “Private Key” in advance. This can be done using the following instruction (by choosing the “file format:” option “.ppk” in point 3) Guide – How To – Create and use Key Pair to connect to a VM
- Connecting to the VM using the PuTTY application. You can download it at the following link – Download
- Go to section SSH on the left panel, and then in Auth
- In the “Auth” section, click “Browse” and specify the path to the .ppk file you received earlier.
- Go to the home page of “Session”, enter the IP address of the VM, and click “Open”.
- In the opened console you will need to enter the login ubuntu.
- Examples of the basic SFTP user management commands:
User creation – sudo addsftpuser
When creating a user, you must add a username and password for this user
Change the password for an existing user – sudo passwd username (where instead of the username, you need to specify the name of an existing user, such as a tester)
Deleting a user – sudo delsftpuser
Account lockout – sudo usermod -L username
Account unlock – sudo usermod -U username
Connecting to SFTP using “FileZilla Client”
To connect to SFTP, it is recommended to use the “FileZilla Client” application (you can download it from the link: https://filezilla-project.org/download.php?platform=win64).
When connecting to the SFTP server, you need to follow these steps:
- In the <Host> field, enter: VM IP address
- In the <Username> field, enter the name of the user you created in step 2 of the previous section
- In the <Password> field, enter the user password you created in step 2 of the previous section
- In the <Port> field, enter port 22
- When the data is entered, press <Quickconnect>
After entering all the data and clicking on <Quickconnect>, you will successfully connect to the port. Now you can work with this server.