3

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] .

2
  • 2
    Looks like an ssh error, nothing to do with python. Commented Oct 4, 2010 at 12:36
  • add an ssh tag to the question ;-) Commented Oct 4, 2010 at 12:44

2 Answers 2

9

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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?

1 Comment

i have to enter a password bt after i enter,it gives me this error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.