0

I am doing scp using below code deployed on server.

    String cmd = "scp /'location'/'file' useracc@xxx.xxx.xxx.xxx:/'location'/" ;
    Runtime run = Runtime.getRuntime();
    Process pr = run.exec(cmd);
    pr = run.exec("password");

The file is not being copied. It throws no error. This is deployed on linux server.

What should I change ?

R_S_C
  • 65
  • 6
  • 1
    "this is not functioning", can you be more specific about that? what are you trying to login to? what is the error? – Stultuske Feb 17 '21 at 08:53
  • @Stultuske..there is no error . But I dont see me file being copied. I'll add discription to question. Thanks – R_S_C Feb 17 '21 at 09:00
  • Try executing the query yourself. Do you get the host key verification message? Maybe that is coming in the way at a first glance. – Feras Wilson Feb 17 '21 at 20:25

0 Answers0