How to copy files on and off remote remote machines.
Copying Files To The Local Linux Box
If you understand how scp represents remote filenames, you can start copying files fairly easily. For example, to copy file /tmp/software.rpm on the remote machine to the local directory /usr/rpm use the commands
[root@bigboy tmp]# scp root@smallfry:/tmp/software.rpm /usr/rpm
root@smallfry’s password:
software.rpm 100% 1011 27.6KB/s 00:00
[root@bigboy tmp]#
To copy the file /tmp/software.rpm on the remote machine to the local directory /usr/rpm using TCP port 435, use the commands[root@bigboy tmp]# scp -P 435 root@smallfry:/tmp/software.rpm /usr/rpm
root@smallfry’s password:
software.rpm 100% 1011 27.6KB/s 00:00
[root@bigboy tmp]#Copying Files To The Remote Linux Box
Copying files to the local Linux server now becomes intuitive. For examples, to copy file /etc/hosts on the local machine to directory /tmp on the remote server
[root@bigboy tmp]# scp /etc/hosts root@192.168.1.103:/tmp
root@192.168.1.103’s password:
hosts 100% 1011 27.6KB/s 00:00
[root@bigboy tmp]#To copy file /etc/hosts on the local machine to directory /tmp on the remote server via TCP port 435, use the commands
[root@bigboy tmp]# scp -P 435 /etc/hosts root@192.168.1.103:/tmp
hosts 100% 1011 27.6KB/s 00:00
[root@bigboy tmp]#
via [Quick HOWTO : Ch17 : Secure Remote Logins and File Copying - Linux Home Networking]
Post a Comment