Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
1) I want to copy files on the 2nd machine to the 1st machine.
2) Move the copied files in the 2nd machine from one directory to other directory. (i.e. to take backup)
3) I am trying to use scp command to copy files in Step 1.
4) and ssh command for both step 1 & step2
5) Now my question is : if ssh-agent is corrupted or killed will scp work?
The main thing over here is I want to avoid creating script files on the 2nd machine for copying and taking backup
Hello, scp and rsync with ssh (as far as i know) , both use the ssh service for communication, this means it is necessary to have such daemon running. But here my question, have you ever seen an ssh service crashing? O.K. there were reasons that the target computer is not answering (hard disks full, whole computer hangs), but in this case it makes no sense to have ssh running and the rest is blocked. I have never seen a working machine where only ssh daemon was hanging, in most cases a lot of other things were not working correctly but on ssh the machine was reachable and managable.
By the way: rsync is a mighty tool it should fulfill all your requirements....
Though ssh agent will really not hang by itself but for exceptional reasons, scp session can end if you are using it on terminal emulator and if the terminal is closed then the session will end without completing the task.
If this is a one-off exercise, use scp to copy across systems, and ssh to use local cp between dirs.
If its a regular thing eg weekly backups, then yes, use rsync (with ssh option) & cron.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.