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] .
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With