IgniTech Logo

IgniTech Logo
Vinoth

Wednesday, March 4, 2009

Copying File across Between two systems in a Lan

If in a Lan, Ping between two system to check the availability of the connection. If peer to peer, connect the lan cable. Assign the IP addresses for the two systems (Like 172.16.25.1 and 172.16.25.2 for both the systems, with subnet mask 255.255.255.0). That is the subnet addresses should be same for both the systems.

scp is the command that can be used for transfering files across the systems. Secure Copy(scp) uses Open SSH protocol for the file transfer. ftp can also be used for the file transfer. For using the scp command you must follow a rule. The rule is, the system you invoke this command should have the ssh client and the target system should have the ssh server(sshd). For copying the files from the source to the destination system, this command can be invoked in both source system or the destination system, but should follow the above rule.

The usage is the scp command is,

#scp username@ :/path/to/the/source/file username@ :/path/to/the/destination/file


To copy a folder from the source system to the destination use the recursive the option,

#scp -r username@ :/path/to/the/source/folder username@ :/path/to/the/destination/folder


The first user name is the user in the source system and the second username is the user in the destination system. The access privileges to the files or folder to copied or to be used as the destination folder depends on the user privileges used in the command.

--
vinoth

No comments:

Post a Comment