ssh - Running scp command from java application without api -
i running script send files 1 server using scp .i want use plain ssh no libraries.
cmd.exe scp location/ user@v40054a.vstage.co:/path
below code
p = runtime.getruntime().exec(command); int = p.waitfor(); system.out.println(" start 1 "+a); string line = ""; string outp = ""; bufferedreader b1 = new bufferedreader(new inputstreamreader(p.getinputstream())); bufferedwriter w1 = new bufferedwriter(new outputstreamwriter(p.getoutputstream())); w1.write("password");
it seems program waits input password . can not figure out way give input process . how can . goal give input process application . out using keys or library . can done ?
Comments
Post a Comment