Ssh – How to access FTP or SFTP in Webmin

ftpsftpssh

I have a linux server running webmin that I cannot connect to with FTP/SFTP.

Usually I can connect to any server, eventually. But not this one.

I can login and create any kind of user, do anything. But can't access SSH through putty. Putty doesn't even connect to the site. tried VSFTPD, PROFTPD. Tried different ports. Same thing. Reponse times out. FTP times out. SFTP times out.

I disabled webmin's firewall and created all kinds of users with different abilities, no passwords, passwords, different groups, /bin/bash /bin/sh. No luck.

Error logs don't show any FTP activity or provide details of the errors.

I've been at this for about 11 hours today, and I'm about out of ideas. Thinking of using something other than webmin.

The site is a remote ip address 216.56.11.7 with no domain name.

The table output is:

Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp echo-request
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT tcp -- anywhere anywhere tcp dpt:12320
ACCEPT tcp -- anywhere anywhere tcp dpt:12321
ACCEPT tcp -- anywhere anywhere tcp dpt:12322 

So it looks like SSH is accepted along with normal protocols. Yes I know FTP is 21 and SSH is 22. There is no limitation on FTP access from this location. I can access any other site. The linux distribution is Debian Linux 7. The firewall I completely disabled. Deleted every rule.

Best Answer

For what it seems you are confusing two services. You mention about not being able to connect to the server using SSH, which in return means you won't be able to connect using SFTP because you need SSH to use SFTP.

Now, FTP is a different port (21). Do you mind if I ask, but what Linux distribution are you using? If you are running Red Had/CentOS you might want to look at the SElinux configuration. If you are running Debian/Ubuntu try running /sbin/iptables -L and look if there are some rules (firewall) that might be preventing you from connecting to the server.

Lastly, check if you don't have a firewall locally that might be blocking ssh or ftp traffic (outbound).

Make sure iptables is not running, you can use the following command: chkconfig iptables off and for ipv6 as well, chkconfig ip6tables off

Hopefully it helps!

Cheers