Hi Team..
I was trying to connect by sftp (with WinScp or FileZilla) to my Dietpi installed in my raspberry Pi 3 Model B. Unfortunetly, I can't connect in any way. WinSCP tells me that STFP Packet is too big and FileZilla is not able to connect to my pi.
Can you help me please ?
Thank you
@TitaneBoy
Hi,
Which software installed on RPi, Proftpd? And, does standard FTP function?
You have to install OpenSSH instead of default Dropbear
Open 'dietpi-software' and go to SSH server and there choose OpenSSH
@Fourdee : Hi !
My installed sofware are:
-OpenSSH (client and server)
-Node.js
-iftop
-IPTraf
-Git Client
-Gogs
-LLMP: Lighttpd | mysql |php
-Lighttpd: webserver
-MySQL: database
-PHP : webserver
-OpenVPN: vpn server
-Rsyslog: system logging
-DietPi-Ramlog
-NextCloud
-Webmin
-PiVPN
-Python Pip
I'm able to connect to my dietpi with the windows software "puTTY" (so by SSH) but not by SFTP with WinSCP or FileZilla
@3d-gussner : As I said before, OpenSSH is already installed and I'm able to connect to DietPi with puTTY.
@TitaneBoy
Strange, SFTP with WinSCP works for me straight out the box.
Please check this package is installed:
dpkg -l | grep openssh-sftp-server
Also check sftp and openssh logs (/var/log/auth.log i believe)
WinSCP tells me that STFP Packet is too big
Also, try disabling jumbo frame, if enabled on your Windows PC.

@Fourdee By running dpkg -l | grep openssh-sftp-server, I can see that package openssh-sftp-server is already installed...This is the output of the command:
ii openssh-sftp-server 1:6.7p1-5+deb8u3 armhf secure shell (SSH) sftp server module, for SFTP access from remote machines
Also, the jumbo frame is already disabled too. By the way, I never touched that settings...
This is what I can see in /var/log/auth.log just after I'm trying to connect with WinSCP on my pi, by sftp, for user dietpi
May 11 11:20:13 MyDietPi sshd[28003]: Accepted password for dietpi from XXX.XXX.XXX.XX port 42297 ssh2
May 11 11:20:13 MyDietPi sshd[28003]: pam_unix(sshd:session): session opened for user dietpi by (uid=0)
May 11 11:20:13 MyDietPi sudo: dietpi : TTY=unknown ; PWD=/home/dietpi ; USER=root ; COMMAND=/DietPi/dietpi/login
May 11 11:20:13 MyDietPi sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
May 11 11:20:13 MyDietPi sudo: pam_unix(sudo:session): session closed for user root
May 11 11:20:13 MyDietPi sshd[28003]: pam_unix(sshd:session): session closed for user dietpi
By trying SCP protocol, it looks to work and I can remote my dietpi.
What I have to do in order to make it work with SFTP protocol ?
Thank you for your answers
@TitaneBoy
The above mentions text print on server, during login can be a cause, so lets check these:
cat "$HOME"/.bashrc
cat "$HOME"/.profile
Also, try disabling #/DietPi/dietpi/login from "$HOME"/.bashrc, then attempt SFTP connection again.
Hi @Fourdee .
By disabling #/DietPi/dietpi/login from "$HOME"/.bashrc, it looks that I can finally connect with sftp protocol with WinSCP :-)
By reading the link you provided, does it mean I have to move the /DietPi/dietpi/login command from "$HOME"/.bashrc to "$HOME"/.profile ?
Thanks again for your answer...
@TitaneBoy
By disabling #/DietPi/dietpi/login from "$HOME"/.bashrc, it looks that I can finally connect with sftp protocol with WinSCP :-)
Excellent, great to hear 馃憤
By reading the link you provided, does it mean I have to move the /DietPi/dietpi/login command from "$HOME"/.bashrc to "$HOME"/.profile ?
For now, yes.
However, if you can please confirm this is functional (with SFTP, DietPi login script executes ok) once moved, we'll roll this change to DietPi.
Marking as resolved. Please reopen if required.
Hi.. Sorry for the delay... I confirm that your given solution worked for me.. 馃槉
Thank you
It seems that the login command is still in bashrc and it still causes issues with scp? Is there going to be a fix for this?
Thanks!
@vvv-ibm
Hi,
Which SSH server installed and client used?
openssh-server 1:7.4p1-10+deb9u3
openssh-client 1:7.6p1-4
dietpi 6.4
Most helpful comment
Hi.. Sorry for the delay... I confirm that your given solution worked for me.. 馃槉
Thank you