0

When I run an SCP script

scp -W Scp\password.txt -P 22 server:/file_location
scp -W Scp\password.txt -P 22 server:/file_location

in command prompt I get the following prompt:

Do you want to trust this new host key and continue connecting?
Please type 'no','once', or 'always':

As I attempt to type first letter of any option above, it keeps on repeating and prompts the same thing.

Please type 'no','once', or 'always':
Please type 'no','once', or 'always':
Please type 'no','once', or 'always':

How can I resolve this?

Aman Mathur
  • 709
  • 2
  • 15
  • 27
  • You say you're running a script? Please edit your question to include the script. Do you know what specific program is being invoked to perform the SCP operation? – Kenster Jun 16 '15 at 20:14
  • I am not sure how my writing the script changes/helps the problem. Nevertheless, I have added the script too. – Aman Mathur Jun 17 '15 at 11:22
  • Stackoverflow is for help writing software. If you're just having trouble running someone else's program, it's not really on topic here. – Kenster Jun 17 '15 at 11:28
  • Where is that `scp` program from? The OpenSSH `scp` utility doesn't have a `-W` option. – Kenster Jun 17 '15 at 11:30

1 Answers1

1

I had this same issue and found that it is resolved by copying and pasting the word you are trying to type in. For me I copied the work always and pasted it into cmd.

Jason
  • 11
  • 1
  • How the heck did you EVER figure that out? This post saved me so much trouble. But really, how did you figure that out? – Syntax Junkie Mar 01 '18 at 15:46