I have an ftp server deployed on aws. I can connect to it from FileZilla as well as from the command line. However, the python script I have gives me:
OSError: [Errno 101] Network is unreachable
I know that my script works since I can connect to other servers.
def test_connection():
server = ftplib.FTP()
server.connect('xx.xxx.xxx.xx')
server.login('xxxx', 'xxx')
print(server.dir())
server.quit()
if __name__ == "__main__":
test_connection()
Any clues what this could be ?
Many thanks :)