Quantcast
Channel: Kamran Agayev's Oracle Blog
Viewing all articles
Browse latest Browse all 60

Using scp with nohup command without providing password

$
0
0

It seems almost impossible for me to use scp from command line with nohup and without providing password. I didn’t want to share authentication keys between servers using ssh-keygen, which seemed to be the only solution to run scp command in the background

I tried:

nohup scp -P 223 /tmp/myfile.dat user:pass@server:/tmp & 

and failed. Using password in such way was incorrect syntax. Then I tried:

nohup scp -P 223 /tmp/myfile.dat user@server:/tmp & 

it asked me for the password:

oracle@server’s password:
oracle

[1]+  Stopped   nohup scp -P 223 /tmp/myfile.dat user@server:/tmp & 

and failed again…

 

After making a little research, I found the following blog post, where the author shows how scp can be used in the command line by providing  password and running the command in the background

http://bharatikunal.wordpress.com/2010/10/20/scp-as-a-background-process/


Viewing all articles
Browse latest Browse all 60

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>