SCP as a background process
I need to transfer 420GBs of files from one machine to another. I don't have physical access to either, so I'm using Putty to get this done from a windows box. The command I'm doing it with is
Code:
scp -r dir root@xxx.xxx.xxx.xxx:/home2/ I tried to run it as a background process (adding an &), but it just won't do that, as it's requesting a password. I tried to run it without requesting a password (with -B), but then it just spits out "permission denied". Any help? |
I think screen is what you need.
man screen, or search this site for how to put process into the background ("detached") with this useful utility. Hope this helps. Edit: Here's a link to how to use screen: http://www.rackaid.com/resources/tips/linux-screen.cfm ... & welcome to LQ! |
try a & at the end of that and it should set it up as a process. or is there a verbose option on scp or debug you could use.
|
You can achieve this by setting up keyed access rather than password access, but making sure that you create a key which doesn't need a pass-phrase. You would install one part of the key on the remote machine and supply the location of the second part of the key to the scp command. As it doesn't require any further passwords, it can be run unattended, for instance as a background job or as a cron/scheduled job.
|
Try - after entering password - pressing Ctrl-Z and then running 'bg' and 'disown' before logging out.
|
All times are GMT -5. The time now is 11:15 PM. |