There are two machines in the LAN. The two machines can communicate with each other without any firewall. The IP addresses of the two machines are a: 192.168.1.240 B: 192.168.1.102. Suppose A, ssh of machine B allows root logon settings to upload/root/abc.zip on machine A to machine B and put it in the/ABC directory, you can use the command SCP/root/abc.zip root@192.168.1.102:/ABC/on machine A if the ssh port is not the default 22, for example, port 1234, add the-p parameter: SCP-P 1234/root/abc.zip root@192.168.1.102:/ABC/You can also use the command: SCP root@192.168.1.240:/root/abc.zip/ABC/below to give an example, hope you can understand: [root @ localhost ~] # PWD/root [root @ localhost ~] # Lsanaconda-ks.cfg ftpaccount install.log.syslogbackup.tar.gz install. Log svn1.4.3 [root @ localhost ~] # SCP backup.tar.gz root@192.168.1.21:/tmp/the authenticity of host' 192. 168.1.21 (192.168.1.21) 'Can't be established. RSA key fingerprint is 4d: B4: E1: 5b: 80: 8f: Ea: DF: 0a: EB: DD: 30: E7: 00: 07: 90.are you sure you want to continue connecting (Yes/No )? Yeswarning: Permanently added '192. 168.1.21 '(RSA) to the list of known hosts.root@192.168.1.21's password: <prompt input 192.168.1.21's sshpassword backup.tar.gz 192 5120kb 100% Mb/s [root @ localhost ~] #
From: http://blog.csdn.net/shuhuai007/article/details/6723359
There are two machines in the LAN. The two machines can communicate with each other without any firewall. The IP addresses of the two machines are a: 192.168.1.240 B: 192.168.1.102. Suppose A, ssh of machine B allows root logon settings to upload/root/abc.zip on machine A to machine B and put it in the/ABC directory, you can use the command SCP/root/abc.zip root@192.168.1.102:/ABC/on machine A if the ssh port is not the default 22, for example, port 1234, add the-p parameter: SCP-P 1234/root/abc.zip root@192.168.1.102:/ABC/You can also use the command: SCP root@192.168.1.240:/root/abc.zip/ABC/below to give an example, hope you can understand: [root @ localhost ~] # PWD/root [root @ localhost ~] # Lsanaconda-ks.cfg ftpaccount install.log.syslogbackup.tar.gz install. Log svn1.4.3 [root @ localhost ~] # SCP backup.tar.gz root@192.168.1.21:/tmp/the authenticity of host' 192. 168.1.21 (192.168.1.21) 'Can't be established. RSA key fingerprint is 4d: B4: E1: 5b: 80: 8f: Ea: DF: 0a: EB: DD: 30: E7: 00: 07: 90.are you sure you want to continue connecting (Yes/No )? Yeswarning: Permanently added '192. 168.1.21 '(RSA) to the list of known hosts.root@192.168.1.21's password: <prompt input 192.168.1.21's sshpassword backup.tar.gz 192 5120kb 100% Mb/s [root @ localhost ~] #
From: http://blog.csdn.net/shuhuai007/article/details/6723359