-1

I have two accounts A, B both registered on the windows server 2008 R2. There is a script in which I use pscp module of putty to transfer files from the server.

Problem being that the command runs successfully using user account A but gets stuck using account B. The command does not complete using user account B

I have to manually terminate it.

Both accounts have the below privilege in group policy and computer management.

  1. Administrator
  2. Logon as a batch
  3. Replace process level token

Please help

Akshay
  • 113
  • 1
  • 14
  • What does the script do? – Mathias R. Jessen Jul 05 '16 at 09:42
  • Mathia I have changed the question entirely . I figured out where the problem was . Please see the edit . PS: the script fetches data from the database , puts it into csv file and transfers it to server via PSCP. The PSCP command does not complete with one account but runs successfully with the other. Please vote up if you find it relevant . Thanks – Akshay Jul 06 '16 at 16:17

1 Answers1

0

I figured out the problem. When we use pscp alone on command prompt , this is the prompt we get

The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is. The server's rsa2 key fingerprint is: ssh-rsa 1024 cc:78:13:a3:68:a6:59:7e:b8:23:2d:13:3e:66:9b:b9 If you trust this host, enter "y" to add the key to PuTTY's cache and carry on connecting. If you want to carry on connecting just once, without adding the key to the cache, enter "n". If you do not trust this host, press Return to abandon the connection. Store key in cache? (y/n) Connection abandoned.

We need to press y/n and the command shall thereafter proceed.

While this command was running in the script , the prompt was not getting any input from the user and was therefore never ending.

To mitigate this

one can do something like this How to pass value to psftp prompt

Community
  • 1
  • 1
Akshay
  • 113
  • 1
  • 14