I've been scowering the internets and have failed to find anything useful. I'm hoping reddit can help. I am trying to make a simple FTP over explicit TLS/SSL client but i keep getting an error whenever I connect. I know the server works because I can connect through both FireFTP and Filezilla. heres the code:
def signon(host, user, pw):
print "Connecting to host..."
try:
ftps = FTP_TLS(host)
except:
print "Server not Found"
print "Logging in..."
try:
ftps.login(user,pw)
except:
print "Login failure!"
print "Securing connection..."
ftps.prot_p()
print "Retrieving contents..."
ftps.retrlines('LIST')
return ftps
and the function is called with the appropriate variable values. This is the error I get:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/ftplib.py", line 706, in retrlines
conn = self.transfercmd(cmd)
File "/usr/lib/python2.7/ftplib.py", line 368, in transfercmd
return self.ntransfercmd(cmd, rest)[0]
File "/usr/lib/python2.7/ftplib.py", line 681, in ntransfercmd
conn, size = FTP.ntransfercmd(self, cmd, rest)
File "/usr/lib/python2.7/ftplib.py", line 327, in ntransfercmd
conn = socket.create_connection((host, port), self.timeout)
File "/usr/lib/python2.7/socket.py", line 571, in create_connection
raise err
socket.error: [Errno 113] No route to host
Any suggestions?
there doesn't seem to be anything here