Skip to content

azyzex/SFTP-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE

  • 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.

Table of Contents

Project Overview

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.

Features

  • 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.

Technologies Used

  • Frontend: HTML, CSS, JavaScript
  • Backend: Python (Flask)
  • Server Communication: Paramiko (for SFTP)
  • Server Software: FreeSSHd, PuTTY (optional for client-side)

Installation

  1. Clone the Repository:

    git clone https://github.com/azyzex/SFTP-website.git
  2. 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.
  3. Install Dependencies:

    • Ensure you have Python installed on your machine.
    • Install required Python packages using pip:
      pip install flask paramiko
      
  4. 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
      
  5. 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.

Usage

Configuring the SFTP Server Connection

  • 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.

Uploading Files

  • 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.

Setting Up the SFTP Server

Installing FreeSSHd

  1. Download FreeSSHd:

  2. Install FreeSSHd:

    • Run the installer and follow the prompts to complete the installation.
  3. 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.
  4. 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).

Installing and Using PuTTY

  1. Download PuTTY:

  2. Install PuTTY:

    • Run the installer and follow the setup instructions.
  3. 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.

Testing File Transfer

  • Using PuTTY:
    • After logging in via PuTTY, you can use command-line tools like scp to test file transfers.
  • 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.

File uploading criterias

  • 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.

Screenshots

note: i've used Filezilla PRO as the client and not puTTy. pkp adas

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published