Reputation: 535
this code is giving following error:
os.system("scp %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: [email protected] .
Upvotes: 3
Views: 1297
Reputation: 439
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?
Upvotes: 0
Reputation: 239908
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.
Upvotes: 9