tags:

views:

294

answers:

1

I'm trying to make a connection to a secure sftp site, however I'm not able to list the directory,however, it's possible to connect using python "expect" or php"ssh2_connect" but it gives me the following mesg: Received disconnect from xx.xx.xx.

If I use a GUI appliction like winscp I'm able to go to the sftp server and retrieve files.

I need to script it thus a cli interface is needed.

PS: just in case someone ran into this. I'm trying to connect to Avisena.com sftp server

+3  A: 

You can do this easily with paramiko, checkout SFTP with Python

cartman
I tried too, it does connect but it disconnects right away.
Sergio Rodriguez
Enable logging to file with paramiko.util.log_to_file('/tmp/paramiko.log') and check the log for problems.
cartman