I want to download files from an FTP server (I have installed a test vsftpd server on Linux 14.04 lts, Python version 2.7.13, Paramiko version 2.2.1) using the following cod
Banner: 220 (vsFTPd 3.0.2) ...
This means you are connecting to an FTP server.
SSHException: Error reading SSH protocol banner
This means you are expecting an SSH server not an FTP server.
The reason for this confusion is that you are assuming that SFTP is just like FTP, but its not. These are completely different protocols. SFTP is file transfer on top of SSH while FTP is the 30+ year old protocol described in RFC959. And FTPS (not SFTP) is SSL support added to this old protocol.
To access an FTP or FTPS server you can use ftplib
in Python.
To access your server with SFTP use port 22 (ssh) not port 21 (ftp) as target port, provided that there is an SSH server at this port which also allows SFTP.