Skip to main content

A simple FTP to SFTP bridge. Fork of `ftp2sftp`.

Project description

ftp3sftp - A simple FTP to SFTP bridge

Usecase

FTP is a protocol that was introduced in the 80's and today has the major problem of non-encrypted communication. Due to this problem, today there are two well-known advancements of the protocol: FTPS and SFTP. Unfortunately, there are still legacy systems in the wild that can only communicate with FTP servers. Depending on the importance and maintenance possibilities of the system, the function of working with one of the encrypted variants cannot be implemented with a realistic effort. If no middleware is then available, there are few options. This is where ftp3sftp comes in and reveals a way to enable communication via SFTP without having to make major changes to the legacy system.

How ftp3sftp works

ftp3sftp itself starts an FTP server to which an FTP client (for example the legacy system) can connect. But in the background a connection to a SFTP server is established after a successful login on the FTP server. All information that the FTP client receives actually comes from the SFTP server. They are passed through directly in both directions. This also means that if the FTP client uploads a file, for example, and receives feedback from ftp3sftp that the file has been successfully transferred, the client can be sure that the file has actually arrived on the SFTP server.

If the FTP client (for example, the legacy system) and ftp3sftp are running on the same machine or at least on the same network, and the target SFTP server is only accessible via the Internet, it can thus be ensured that the data transfer via the Internet is appropriately encrypted using the SFTP protocol.

How to install ftp3sftp

You can install it using uv:

uv tool install ftp3sftp

How to use ftp3sftp

Command line arguments

We imagine the following situation: A legacy software is configured to connect to an FTP server connected at the following URL: 127.0.0.1:21 as user ftp-user and password secret. The software also expects it to write to the following directory as its home directory: /home/ftp-user. The bridge should connect to your SFTP server, which can be reached at external-sftp-server:22. It should connect with the user sftp-user and the password 1234512. On the SFTP server /home/sftp-user is the home directory. Also, a log is to be written to the /log/ftp3sftp directory.

For this configuration you have to call ftp3sftp with this arguments: ftp3sftp --ftp ftp-user:secret@127.0.0.1:21:/home/ftp-user --sftp sftp-user:1234512@external-sftp-server:22:/home/sftp-user --logdir /log/ftp3sftp

Both, the --ftp and the --sftp parameter have the same format: username:password@host:port:/homedirectory. Note: the homedirectory can also be something like /. It depends on the server or client configuration.

You can see the all command line arguments by using --help.

Store command line arguments in a textfile

You can store your command line options in a textfile. For the example above it could contain the following data:

--ftp
ftp-user:secret@127.0.0.1:21:/home/ftp-user
--sftp
sftp-user:1234512@external-sftp-server:22:/home/sftp-user
--logdir
/log/ftp3sftp

Whe you do so, your only paramter to ftp3sftp could be the path to the file with a as prefix. If your configuration is in /etc/ftp3sftp.conf you can call ftp3sftp like this: ftp3sftp @/etc/ftp3sftp.conf So it will read its command line arguments from the file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ftp3sftp-0.7.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ftp3sftp-0.7.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file ftp3sftp-0.7.1.tar.gz.

File metadata

  • Download URL: ftp3sftp-0.7.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ftp3sftp-0.7.1.tar.gz
Algorithm Hash digest
SHA256 02d09018020f2d41a4c602f81da72d6259d9c41032944abdd6a39a49979f405a
MD5 8e11ff7278672b15ad4b561edad81a99
BLAKE2b-256 92001bd158d38b554070a62d3f8e498a4966ef6c6e23c7bb15bd4470063e37cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for ftp3sftp-0.7.1.tar.gz:

Publisher: publish_pypi.yaml on iliqiliev/ftp3sftp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ftp3sftp-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: ftp3sftp-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ftp3sftp-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38335f5fa6b5fc6799415a6be8db1bda2eac7284ebd552299953723492facbf4
MD5 8b71f3a52c7b6631198a12cec6213328
BLAKE2b-256 5e324c5138328f4745d89ed6085b766292d2ba7fee8ddfaed68f46c03cd1a6d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ftp3sftp-0.7.1-py3-none-any.whl:

Publisher: publish_pypi.yaml on iliqiliev/ftp3sftp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page