Error executing scp from python

this code gives the 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 command line arguments that take the username and machine name as arguments:

for example: root@10.88.77.77.

+3
source share
2 answers

This has nothing to do with Python and anything related to SSH.

Permission denied (publication, keyboard interactive).

He tells you that you were unable to log in. I suggest you either sort your key based on the key, or pass it a password.

See: http://unixhelp.ed.ac.uk/CGI/man-cgi?ssh+1

, scp, pure-python.

+9

scp. , ? ?

0

Source: https://habr.com/ru/post/1767864/


All Articles