LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   If I exit an SSH session, would it terminate transfers from one server to another? (http://www.linuxquestions.org/questions/linux-server-73/if-i-exit-an-ssh-session-would-it-terminate-transfers-from-one-server-to-another-831119/)

imekul 09-09-2010 12:59 AM

If I exit an SSH session, would it terminate transfers from one server to another?
 
I SSH into a few servers now and then, oftentimes to copy large files or a large amount of files from one server to another. Typically I use either scp, ftp, or rsync.

My question is, what happens if I get a transfer going (scp, ftp, rsync) and then quit out of the SSH session? Would the operation/transfer still proceed, or does it end as soon as I would close Putty or whatever SSH client?

The reason I'm asking is because oftentimes, these transfers can take some time, but it only takes me a few seconds to give the command. It would be handy if I didn't have to worry about keeping the SSH connection going, but I'm just not sure how that works.

EricTRA 09-09-2010 01:12 AM

Hello and Welcome to LinuxQuestions,

Have a look at the nohup command:
Code:

man nohup
and how to put a process in the background using & at the end of the command. Basically
Code:

nohup yourcommand &
will detach the command from the shell/console with the nohup and put it in the background with the & at the end. Then you can safely disconnect your SSH session. You can check by logging in again and see if your process is still running.

Kind regards,

Eric

goldenbarb 09-09-2010 02:17 AM

You can also use tool screen .


All times are GMT -5. The time now is 06:21 AM.