![]() Let’s have a look at an example of that: ~]$ scp. ![]() You can also copy a file (or multiple files) from the (remote) server to your own local computer. For remote hosts, the file(s)/directory are given to the scp command is this way. Just like Linux’s normal cp command, scp will need to know both the source file(s) and the target directory (or file). ![]() There’s a colon over there, with a directory after it. Let’s have a closer look at the end of the command. You could leave out the in front of “yourserver”, but only if you want to login on the server with your current username on your own computer. That’s quite a lot information, but scp really needs it all. These options are very useful for a lot of things that require files to be transferred, so let’s have a look at the syntax of this command: ~]$ scp examplefile scp command above will transfer the file “examplefile” to the directory “/home/yourusername/” at the server “yourserver”, trying to get ssh acces with the username “yourusername”. In the third case, the data is transferred directly between the servers your own computer will only tell the servers what to do. To copy from a (remote) server to another (remote) server.To copy from your computer to a (remote) server.To copy from a (remote) server to your computer.However, there are some important differences. The scp command uses the ssh command and they are very much alike. This is pretty useful if you want to transport files between computers, for example to backup something. The scp command allows you to copy files over ssh connections. The difference is this: SSH is the general protocol, and ssh is the linux SSH client command. Before we start: in this tutorial, you will come across both SSH and ssh.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |