Monday, December 9, 2013

Test active mode ftp in linux

Ftp is old and insecure, but some people still use it. So here's a way to test it on linux to see if your ftp server is responding to active mode ftp correctly:

for ftp:


ftp ftp-server.com
type your username
type your password
passive off          # this turn off the passive mode, then you can run ls, get, put command
ls
quit


for ftps using lftp (you can type debug to get into debug mode)


implicit (assuming port 990)


lftp ftps://ftp-server.com:990
set ftp:passive-mode off
user username
type your password 
#type ls, get, put command
ls
exit



explict (assuming port 21)


lftp ftp://ftp-server.com
set ftp:ssl-allow-anonymous yes
set ssl:verify-certificate off
set ftp:passive-mode off
set ftp:ssl-force on
set ftp:ssl-allow on
user username
type your password 
#type ls, get, put command
ls
exit