error when exec'ing scp from python
this code is giving following error:
os.system("sc开发者_开发技巧p %s:/export/home/sample/backup.sql %s:/home/rushi/abc.sql" % (a, b))
Permission denied (publickey,keyboard-interactive).
lost connection
a and b are the command line arguments which accept user name and machine name as arguments:
eg: root@10.88.77.77 .
This has nothing to do with Python and everything to do with SSH.
Permission denied (publickey,keyboard-interactive).
It's telling you you have failed to log in. I suggest you either sort your key-based auth out or pass it a password.
See: http://unixhelp.ed.ac.uk/CGI/man-cgi?ssh+1
Or instead of trying to use the scp
command, use a pure-python method.
That error is coming from scp. What happens if you run the command yourself? Are you expecting to use public key to connect or do you have to enter a password?
精彩评论