课程: Linux System Engineer: Networking and SSH

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Execute commands remotely using SSH

Execute commands remotely using SSH

- [Narrator] There are several different ways of transferring files from one to host to another using an encrypted tunnel, the easiest being scp or secure copy. scp acts like the local cp command, but the arguments a bit more complex as you'll see. The syntax for scp is, scp, space, options, space, source file, space, destination file. At first glance the syntax looks the same as the cp command, however, the source and destination files may include the host name or IP address. For instance to copy the local/etcs/hosts file to a remote server you might type in, scp, space, /etc/hosts, space, the IP address, :/tmp. The source file is the local path and the destination file is an IP address and remote path separated by a colon. We can also copy a remote file to a local location by reversing the arguments. Now the source is the remote host and the destination is a local path. This copies the remote/etc/hosts file to the local/tmp directory. By default scp uses the standard SSH port number…

内容