SFTP client issues
Hello,
I am having trouble using a SFTP client to connect to my server. I am able to connect to SSH but not SFTP through WinSCP or Filezilla using the root user.
Status: Connecting to 123.345.789.121…
Response: fzSftp started, protocolversion=8
Command: open "root@123.345.789.121" 22
Error: Connection timed out after 20 seconds of inactivity
Error: Could not connect to server
Status: Waiting to retry…
Status: Connecting to 123.345.789.121…
Response: fzSftp started, protocolversion=8
Command: open "root@123.345.789.121" 22
Error: Connection timed out after 20 seconds of inactivity
Error: Could not connect to server
3 Replies
Hello,
Can you please provide us with the results of the following commands to be able to better assist you with this issue.
sudo iptables -L
egrep -i '(permit|password|key)' /etc/ssh/sshd_config | grep -v '#'
iptables -L
Chain ufw-track-input (1 references)
target prot opt source destination
Chain ufw-track-output (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere ctstate NEW
ACCEPT udp -- anywhere anywhere ctstate NEW
Chain ufw-user-forward (1 references)
target prot opt source destination
Chain ufw-user-input (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT udp -- anywhere anywhere udp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT udp -- anywhere anywhere udp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT udp -- anywhere anywhere udp dpt:https
Chain ufw-user-limit (0 references)
target prot opt source destination
LOG all -- anywhere anywhere limit: avg 3/min burst 5 LOG level warning prefix "[UFW LIMIT BLOCK] "
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain ufw-user-limit-accept (0 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain ufw-user-logging-forward (0 references)
target prot opt source destination
Chain ufw-user-logging-input (0 references)
target prot opt source destination
Chain ufw-user-logging-output (0 references)
target prot opt source destination
Chain ufw-user-output (1 references)
target prot opt source destination
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
egrep -i '(permit|password|key)' /etc/ssh/sshd_config | grep -v '#'
HostKey /etc/ssh/sshhostrsakey
HostKey /etc/ssh/sshhostdsakey
HostKey /etc/ssh/sshhostecdsakey
HostKey /etc/ssh/sshhosted25519key
KeyRegenerationInterval 3600
ServerKeyBits 1024
PermitRootLogin yes
PubkeyAuthentication yes
PermitEmptyPasswords no
PasswordAuthentication no
Hi,
I see that you have "PubkeyAuthentication yes" set in your configuration. Can you please ensure that your Filezilla connection is configured to use the "key file" option with the correct public key specified?
https://wiki.filezilla-project.org/Howto
If that does not work, to further troubleshoot, you can temporarily set "PubkeyAuthentication yes" to "PubkeyAuthentication no" then restart SSH in Lish. If you're then able to connect with Filezilla we know that the issue lies somewhere within your key configuration. If you're still unable to connect then we can begin looking elsewhere.