Linux - Running scp to copy directory on the background

My problem was password prompt, so, I use the following to run scp at the background to copy everything in a directory to a remote host

nohup scp -r /path/to/directory username@hostname:/path/to/landing/directory

Then, enter the password when prompted. If the password is correct, it will proceed to copy the directory to remote host.

Next, press 

ctrl + z

The above will suspend the command. Once the command suspended, type

bg

to execute the command to background.


Comments

Popular Posts