Use of centos 7 scp command

scp command: scp is secure copy, which is used to copy files or directories from one Linux system to another Linux system. The scp uses the SSH protocol to transmit data, which ensures the security of data transmission.
Format: scp remote user name@ip address: absolute path of the file local Linux system path (pull files from remote host)
scp local linux system file path remote user name@ip address: absolute path name of remote system file (like remote host push file)

            例: # scp  /home/ixdba/etc.tar.gz  [email protected]:/tmp(当报错 "not a regular file";可加参数 -r 解决,当拉取或推送的是目录时需加 -r 参数);
                    #scp  [email protected]:/home/ixdba/etc.tar.gz  /tmp
                    #scp -r  /etc  [email protected]:/opt
                    使用 -P参数可跟端口号,指定远程连接的端口号。

Guess you like

Origin blog.51cto.com/12772149/2597371