How To Download Files With Ssh or Scp
I need to download my image files from my linux server. How can achive this with securely. Security may be not a concern but getting files remotely from linux servers may became headache. Or if you have a MacOS and copying file remotely is hard with Apple products. Here is the solution scp which is a secure copy tool. Scp is a part of ssh tools ans uses ssh service to accomplish its task.
Copy A Single File
We can copy a single file just pointing it.
1 2 3 4 5 | [root@cen1 ~]# scp ismail@ubu1:/home/ismail/.viminfo . ismail@ubu1's password: .viminfo 100% 990 1.0KB/s 00:00 |
Copy Recursively
We want to copy all files resides in specified directory. So we provide -r option
1 2 3 4 5 6 7 8 9 10 11 12 | [root@cen1 test]# scp -r ismail@ubu1:/home/ismail/ test/ ismail@ubu1's password: id_rsa 100% 1679 1.6KB/s 00:00 id_rsa.pub 100% 393 0.4KB/s 00:00 .sudo_as_admin_successful 100% 0.0KB/s 00:00 .viminfo 100% 990 1.0KB/s 00:00 .bash_logout 100% 220 0.2KB/s 00:00 .dmrc 100% 25 0.0KB/s 00:00 .bashrc 100% 3771 3.7KB/s 00:00 motd.legal-displayed 100% 0.0KB/s 00:00 .profile 100% 655 0.6KB/s 00:00 .bash_history 100% 79 0.1KB/s 00:00 |