Transfer files from windows machine to remote solaris machine using python script -
i used following code establish connection between local machine , remote machine :
import os, sys, ftplib nonpassive=false remotesite= '10.88.203.21:22' remoteuser='root' remotepass='v-peg8!@#' localdir= "c:\\.." print "connecting" connection=ftplib.ftp(remotesite) print "successfully connected" connection.login(remoteuser,remotepass) if nonpassive: connection.set_pasv(false)
but giving me following error: socket.gaierror: [errno 11001] getaddrinfo failed.. can plz me out this.
you need specify port separate argument, not in way have in remotesite
. try:
remotesite = '10.88.203.21' port = 22 connection = ftplib.ftp(remotesite, port)
see ftp docs more information.
Comments
Post a Comment