I already saw this thread, but it didn't answer my question because it has been left for dead.
As the title says, when I log into my VPS with putty, everything works fine. But when connecting with FileZilla through SFTP, I always get an error : Authentication failed, cannot establish connection to the server
(roughly translated).
I am using the right settings in FileZilla because I only got this error 3 days ago and it used to work fine before : SFTP through port 22.
Here is an iptables -L
:
(TL;DR : accept everything in and out on ports 20, 21 and 22, and passive inbound connections on ports 1024+)
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp ctstate ESTABLISHED /* Allow ftp connections on port 21 */
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp-data ctstate RELATED,ESTABLISHED /* Allow ftp connections on port 20 */
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpts:1024:65535 ctstate ESTABLISHED /* Allow passive inbound connections */
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ctstate ESTABLISHED /* Allow ftp connections on port 22 */
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp ctstate NEW,ESTABLISHED /* Allow ftp connections on port 21 */
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp-data ctstate ESTABLISHED /* Allow ftp connections on port 20 */
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpts:1024:65535 ctstate RELATED,ESTABLISHED /* Allow passive inbound connections */
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ctstate ESTABLISHED /* Allow ftp connections on port 22 */
I did set this manually in case that was the source of my problems, but nothing changed.
I also set PasswordAuthentication yes
and LogLevel DEBUG
as the previous thread suggested as well, but nothing changed neither after restarting sshd.
Here is what I get in /var/log/auth.log
when I try to connect with FileZilla : literally nothing related to SFTP login.
It only contains stuff about me doing sudo
s to access the file.
I don't know whether it comes from FileZilla because auth.log
shows nothing related to SFTP connection, or it comes from sshd configuration just ignoring SFTP requests.
I can't seem to find anything to help me, do you have any suggestions ?
Thank you for your time reading this.
Command : open "[email protected]" 22
, 1s delay,Command : Pass: ******
, 1s delay,Error: authentication failed, cannot establish connection to the server
. Considering the only 1s delay, I'd go for the not handled response option. What could cause this ?tcpdump -qni any port 22
. Though you might have to add more filtering to exclude any active SSH connections.tcpdump -qni any port sftp or ftp-data
and tried to connect with FileZilla but nothing came out :0 packets captured, 0 packets received by filter, 0 packets dropped by kernel
. Is this even the right command ?