-1

I have the following issue... i need to connect to sftp(vsftpd) through python script, upload a file and download it. So far i have created ftp server with vsftpd but i cannot connect. If i use the terminal(ftp localhost) i can log in without any problems. Please advise how i should proceed.

Here is my python script: http://codepaste.net/omysxu

and here is the config file of vsftpd: http://codepaste.net/1qrrdf

The thing that i am trying to do is.. set up a ftp server, then i should have 2 scripts(or 1) which will have to upload file via ssh then download it in another dir.

Alfred Huang
  • 17,654
  • 32
  • 118
  • 189
noonewin
  • 108
  • 1
  • 8

1 Answers1

1

vsftpd is a FTP server and can not be accessed with the SFTP protocol. FTP, SFTP and FTPS are often confused:

  • FTP = file transfer protocol (RFC959) - supported by vsftpd
  • FTPS = extension for using TLS with FTP (RFC4217) - supported by vsftpd
  • SFTP = file transfer using the SSH protocol - not supported by vsftpd, you need SSH for this.
Steffen Ullrich
  • 114,247
  • 10
  • 131
  • 172
  • Thanks, that answer my question, but if you have some guides for me on how to create those scripts. – noonewin Jun 03 '15 at 12:17