Uses batch mode, operating without any interactive keyboard input. This option also disables the progress meter. Without this option the data is copied directly between the two remote hosts. This is an older protocol.Ĭopies between two remote hosts are transferred through the local host. This is an older protocol.įorces scp to use protocol 2. file2 Options -1įorces scp to use protocol 1. Copies between two remote hosts are also permitted. Local file names can be made explicit using absolute or relative pathnames to avoid scp treating file names containing ' :' as host specifiers. Unlike rcp, scp will ask for passwords or passphrases if they are needed for authentication.įile names may contain a user and host specification to indicate that the file is to be copied to/from that host. It uses ssh for data transfer, and uses the same authentication and provides the same security as ssh. Scp copies files securely between hosts on a network. Keep in mind that all scp transfers have the benefit of being secure: they are encrypted, like an ssh or sftp session. while this command will transfer a file from one remote host to another: scp :/somedir/somefile.txt :/anotherdir For instance, the following command will transfer a file from one remote directory on to another directory on the same server: scp :/home/user/dir1/file.txt :/home/user/dir2 You can also specify a remote host as both the source and destination. jpg, into the local directory /home/stacy/downloads. would download all the files in the remote directory /home/stacy/archive on whose name starts with " image" and ends in. For example, scp :/home/stacy/archive/image*.jpg /home/stacy/downloads Or, you could specify a remote location as the source location if you want to download files. scp will ask for stacy's remote password before initiating the upload. to upload those same files to the server, using the login name stacy, into the remote directory /home/stacy/archive. Similarly, you could use the scp command: scp /home/stacy/images/image*.jpg :/home/stacy/archive jpg" into the directory archive in her home directory. which would copy all files in the directory images in user stacy's home directory whose name starts with " image" and ends in ". For example, you might use the following cp command: cp /home/stacy/images/image*.jpg /home/stacy/archive The scp command can be thought of as a network version of cp.
0 Comments
Leave a Reply. |