在linux服务器上配置了sftp,打算用filezilla传文件,就在sftp配置好以后,用filezilla连接的时候出现问题,提示端口被拒绝。
在command line测试
[root@16 ~]# sftp sftpl@localhost
Connecting to localhost...
ssh: connect to host localhost port 22: Connection refused
Couldn't read packet: Connection reset by peer
连接被拒绝,分析一下,是防火墙设置问题,于是乎,修改 /etc/sysconfig/iptables
添加以下内容:
-A INPUT -p tcp -m tcp --dport 端口号 -j ACCEPT
顺利解决。
不过安全意识提醒着我,需要设置一下访问权限访问路径等等,所以记到这,我继续了。