HI,
I have a built a logger that logs data and uploads that data to an FTP server using an FTP client on the MKR GSM 1400 board and this works well. However the FTP server is being shutdown and replaced with an SFTP server that allows user/pass authentication (does not require PKI authentication).
Does this mean that once a connection to the SFTP server is made using the username and password, does this then act as a secure tunnel to use conventional FTP commands and data channel or do the FTP commands and data on the data channel still have to be encrypted and if so is this even doable with an Arduino device such as the MKR GSM 1400 or MKR NB 1500?
FTP operates in clear text, meaning that data, including usernames and passwords, is sent in plain text, making it vulnerable to interception.
SFTP (it stands for SSH File Transfer Protocol) is a secure file transfer protocol that runs over an encrypted SSH (Secure Shell) tunnel ➜ Both commands and data are encrypted, providing a secure channel (against eavesdropping and tampering) for file transfer.
==> You can't use your FTP library to connect to an SFTP server. You would need a different library.
Would SSH tunnelling (port forwarding) allow use of standard FTP commands to work on an SFTP server? Although i dont fully understand port forwarding all that well.
They are not the same thing. SSH tunneling uses port forwarding as a mechanism to securely transmit data through an encrypted SSH connection, while port forwarding itself is a broader technique that redirects network traffic from one port to another, without necessarily involving encryption or SSH.
Not sure what you try to achieve there if the expected protocol is SFTP ➜ you cannot use standard FTP commands to an SFTP server, even if you establish an SSH tunnel. SFTP and FTP are different protocols. As explained previously , SFTP operates over an SSH connection and uses different commands and methods compared to FTP, which operates over an unencrypted connection.