- This project's texts and content is written in french and can be modified easily.
- The upload folder is used as a directory to transfer files to.
- the arrow button takes the page back to the intial page.
- Project Overview
- Features
- Technologies Used
- Installation
- Usage
- Setting Up the SFTP Server
- Screenshots
- License
This project was developed during an internship at Sagemcom Tunisia. The purpose of this web application is to facilitate the secure transfer of sound test result files generated by either Klippel or Matlab. The files are uploaded via a user-friendly interface and are sent to an FTP server secured by SSH protocol. The server operates with a standard logon type (username and password) on port 22.
- User Interface: A clean, modern interface that allows users to select the software used (Klippel or Matlab) and upload the corresponding files.
- File Validation: The application ensures that only the correct file types and quantities are accepted for each software.
- Secure File Transfer: Files are sent securely to an SFTP server using SSH encryption.
- Customization: Easily configure the server details (host, username, password, and port) to match your setup.
- Frontend: HTML, CSS, JavaScript
- Backend: Python (Flask)
- Server Communication: Paramiko (for SFTP)
- Server Software: FreeSSHd, PuTTY (optional for client-side)
-
Clone the Repository:
git clone https://github.com/azyzex/SFTP-website.git
-
Navigate to the Project Directory:
- On Windows, right-click the project folder and select "Open in Terminal".
- If using VS Code, you can also open the folder directly and then open a terminal within the editor by going to Terminal -> New Terminal.
-
Install Dependencies:
- Ensure you have Python installed on your machine.
- Install required Python packages using pip:
pip install flask paramiko
-
Run the Application:
- In the terminal, run the following command:
python bython.py
- The terminal should display output similar to this:
PS C:\Users\AZYZ\Desktop\vking> python bython.py * Serving Flask app 'bython' * Debug mode: on WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Running on http://127.0.0.1:5000 Press CTRL+C to quit * Restarting with stat * Debugger is active! * Debugger PIN: 521-630-233
- In the terminal, run the following command:
-
Access the Application:
- CTRL+left click on the URL
http://127.0.0.1:5000
in the terminal, or paste it into your browser's address bar.
- CTRL+left click on the URL
- Open the
bython.py
file in your preferred code editor. - Modify the following variables to match your SFTP server's configuration:
host = 'your_sftp_host' username = 'your_username' password = 'your_password' port = your_port # Default is 22
- Ensure that your machine is on the same network as the SFTP server.
- Select the software used (Klippel or Matlab) from the initial interface.
- Upload the required files via the drag-and-drop feature or by clicking the upload area to open your file explorer.
- Press "Send" to upload the files to the server. The interface will validate the files before transfer.
-
Download FreeSSHd:
- Visit the FreeSSHd official website and download the latest version.
-
Install FreeSSHd:
- Run the installer and follow the prompts to complete the installation.
-
Configure FreeSSHd:
- Open FreeSSHd and navigate to the Users tab.
- Click Add to create a new user.
- Enter the username (e.g.,
dan
) and password (e.g.,0000
). - Ensure that the Shell and SFTP options are enabled.
-
Start the SSH Server:
- In the Status tab, click Start to run the SSH server on your machine.
- Ensure the server is running on port 22 (default for SSH).
-
Download PuTTY:
- Visit the PuTTY official website and download the appropriate version for your OS.
-
Install PuTTY:
- Run the installer and follow the setup instructions.
-
Connect to the SFTP Server:
- Open PuTTY and enter your server's IP address (or
127.0.0.1
for localhost) in the Host Name field. - Set the Port to 22.
- Select SSH as the connection type.
- Click Open to start the session.
- Log in with the credentials you set up in FreeSSHd.
- Open PuTTY and enter your server's IP address (or
- Using PuTTY:
- After logging in via PuTTY, you can use command-line tools like
scp
to test file transfers.
- After logging in via PuTTY, you can use command-line tools like
- Using the Website:
- Follow the instructions in the Usage section to upload files via the web interface and verify that they are successfully transferred to the server.
- Klippel : exactly 4 files : 2 kdbx, 1 pdf, 1 log.
- MatLab : exactly 3 files : 1 txt, 1 pdf, 1 log. anything else will show an error explaining the problem upon pressing the send button. the reset button deletes all the selected files.
note: i've used Filezilla PRO as the client and not puTTy.
This project is licensed under the MIT License - see the LICENSE file for details.