1.9 Copying Files

Whenever you copy a file from one machine to another, copy it using a secure copy utility that uses the Secure Shell (SSH) protocol. The exact syntax of the copy command will vary based on the utility you use.

Example:

  1. Copy the /usr/local/nac/properties/NACAVPs.txt file from the Novell ZENworks Network Access Control server to the ACS server using PSCP (or other secure copy utility).

1.9.1 SCP

scp is a Linux/UNIX command used to copy files between Linux/UNIX machines. It has the following syntax:

scp user@source:/directory/file user@destination:/directory/file

scp is included with Linux/UNIX.

1.9.2 PSCP

pscp is a program used to copy files between Windows and Linux/UNIX machines.

To use pscp, you must first save it from the following location to the Windows machine:

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Next, open a DOS (command) window on the Windows machine, and enter the commands as follows:

To copy a file from a Linux machine to a Windows machine, enter the following:

<pscp directory> \pscp fred@example.com:/etc/hosts c:\temp\example-hosts.txt

You will be prompted to enter a password for the Linux/UNIX machine.

To copy a file from a Windows machine to a Linux machine, enter the following:

<pscp directory> \pscp c:\documents\foo.txt fred@example.com:/tmp/foo

You will be prompted to enter a password for the Linux/UNIX machine.

NOTE:You can either enter the path to the PSCP.EXE file as part of the command, or cd to the directory where you saved the PSCP.EXE file before entering the pscp command.