Linux or UNIX securely copy files across a network computer
Q. FTP is insecure, how do I securely copy files across a network computer? My network has Windows and Linux systems.
A. You need to use Openssh client and server technology to copy between two more network computers. You can also find free ssh client tools. scp copies files between hosts on a network. It uses ssh for data transfer, and uses the same authentication and provides the same security as ssh.
Copy from Linux to Linux/UNIX system
Copy file called data.txt to ras.nixcraft.in Linux system (vivek is username):
$ scp data.txt vivek@ras.nixcraft.in:/home/vivek
Copy more than two files:
$ scp data.txt pic.jpg vivek@ras.nixcraft.in:/home/vivek
Copy /data directory and all files inside /data i.e. recursively copy entire directories:
$ scp -r /data vivek@ras.nixcraft.in:/home/vivek
Copy from Windows to Linux/UNIX system
You can download any one of the following free Windows SCP client
Just install above client and follow on screen instructions.
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Other Helpful FAQs:
- Linux Copy all the files including subdirectories from DVD / Floppy / CD / Other directory (recursive copy)
- How to Tunnel X Windows Securely over SSH
- Linux Copy File Command ( cp command examples )
- Linux / UNIX: Delete a file
- Linux Copy One Hard Disk to Another Using dd Command
Discussion on This FAQ
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: copy_files, free_ssh_client, network_computers, openssh, pscp, recursively_copy_files, scp_client, scp_command, scp_copies_files, ssh_copy, unix_system, winscp



April 8th, 2007 at 4:36 pm
[...] On the other hand, just upload a newly build axel binary to remote Linux server using scp. [...]
July 11th, 2007 at 4:15 pm
Is there a way to copy multiple files to multiple servers? I’ve tried putting in a space and the location of the other server but no luck.
July 11th, 2007 at 7:01 pm
Todd,
You can copy multiple files to multiple servers using shell for loop:
SERVERS="user1@box1 user2@box2 user3@box3" for s in $SERVERS do scp file1 file2 ${s}:/path doneFebruary 13th, 2008 at 11:53 pm
you could also use it without a script.
for i in 1 2 3; do scp file1 file2 user@box$i; done
February 13th, 2008 at 11:55 pm
Actually it would be better if you could generate the ssh. keys and add it to your client machines.
March 7th, 2008 at 5:45 am
Is it possible to send password in the same line?
As in ftp we use, user/password@host . We cant disturb the remote machine for moving public key files. Thats why.