Copying scp. How to copy a file to a remote server

if you have home server or a server on the internet, you'll need a way to securely move files between machines. Between local machines, we could simply transfer data using a USB flash drive, but we need to transfer data to a remote server only through the network. There are many ways to accomplish this task.

In this article, we will look at how files are copied using the scp (Secure Copy Command) utility, and what it is Linux team scp. Files are encrypted during transfer so that no one else can access them and the best part is that you don't need to set up FTP or other additional software. An SSH server will suffice.

The scp command is a utility that works over the SSH protocol, which means that all you need to transfer a file to a computer is that an SSH server is running on it, and you also need to know the username and password to connect to it. Using the scp command, you can not only move files between the local and remote systems, but also between two remote systems. To do this, it will also be enough to know the passwords from them. And unlike Rsync, you don't need to log into one of the servers.

Copying scp files

This article is intended primarily for beginners, so I will try to explain everything in as much detail as possible. Before we move on to practice, we need to consider the general syntax of the command:

$ scp options user [email protected] host1: file user [email protected] host2: file

The utility options are more about the SSH protocol and configure its general behavior. This is followed by the address of the first and second file. Each of them can be located both on the local and on the remote machine. And now consider the main options that we may need:

  • -1
  • -2
  • -B
  • -C- enable compression;
  • -l
  • -o- set the desired SSH option;
  • -p
  • -r
  • -v- more detailed mode.
  • -1 - use the SSH1 protocol;
  • -2 - use the SSH2 protocol;
  • -B- batch mode for transferring multiple files;
  • -C- enable compression;
  • -l- set the speed limit in kbps;
  • -o- set the desired SSH option;
  • -p- save modification time;
  • -r- recursive copying of directories;
  • -v- more detailed mode.

scp /home/sergiy/file [email protected] site:/root/

As a user, you need to use any user that is on the server. Instead of an IP, you can also use the server's domain. It is only necessary that the selected user has write permissions to the specified folder.

With the -r option, you can copy an entire directory to the remote machine. The command will look like this:

scp -r /home/sergiy/photos [email protected] site:/root/

Make sure the source directory does not have a slash, and the destination directory must have one. With a slight change in the slash syntax, you can transfer all files from a directory to a remote server:

scp -r /home/sergiy/photos/* [email protected] site:/root/

If you swap the local path and the server, then you can copy scp files from the remote server to the local computer:

scp [email protected] site:/root/file /home/sergiy/

In the same way, you can copy scp files or folders from the server:

scp-r [email protected] website:/root/photos/home/sergiy/

Please note that the folder you are going to copy to must end with a slash, otherwise the folder you are copying will be written instead of the one you want to copy to.

To download the scp file from one server to another, you just need to provide authentication data on each of them. For example, let's copy one file:

scp [email protected] site:/home/root/index.html [email protected] website: /home/root/www/

Let's copy the folder from the same remote server:

scp [email protected] site:/root/photos [email protected] website: /home/root/www/

findings

In this article, we looked at how scp file transfer works, how it works, and what you can do with this utility. As you can see, moving files from one server to another is very easy. In Linux, it is enough to understand the basics to start working more efficiently! The scp command is one such tool.

about the author

Founder and site administrator site, fond of open software and operating Linux system. I currently use Ubuntu as my main OS. In addition to Linux, I am interested in everything related to information technology and modern science.

SCP (Secure Copy Protocol)- Linux command to securely copy files or folders to remote computer(server) or from it using the SSH (Secure Shell) protocol. SCP is part of the OpenSSH package. Through the use of ssh, SCP is a great replacement for the insecure FTP protocol that is widely used on the Internet.

Sometimes there is a task of transferring files from one server to another.

I will give examples of how to use it.

Login to the server using SSH protocol, for example, through the program - PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/)

1. How to copy a file to a remote server:

We go to the directory from where you want to copy the file / files, for example file1.zip in the /home/ directory, you need to copy it to the remote computer in the /home2/ folder. We are on the first server 192.168.0.1

[email protected] # scp file1.zip [email protected]:/home2/
or from anywhere
[email protected] [/]# scp /home/file1.zip [email protected]:/home2/

[email protected]"spassword:

those. scp file user@server_address (IP or domain): directory on the remote server where you want to copy this
if you need to copy several files, you can specify them separated by a space, i.e.: file1.zip file2.zip ...

2. How to copy files and folders to a remote server:

for example you need to copy multiple directories and there are many files in each directory. We are on the first server 192.168.0.1

[email protected] [/]# scp -r /home/ [email protected]:/home2/
after entering you will be asked for a password to the remote server.
[email protected]"spassword:

will copy everything that is in the /home/ directory
those. scp directory_from_to_copy_folders_and_files_user@server_address (IP or domain): directory on the remote server where you want to copy this

3. How to copy a file from a remote server:

For example, on a remote server there is file1.zip in the /home2/ directory, copy it to local server(wherever you are) to the /home/ folder. We are on the first server 192.168.0.1

[email protected] [/]# scp [email protected]:/home2/file1.zip /home/
after entering you will be asked for a password to the remote server.
[email protected]"spassword:

those. we will copy the file file1.zip from the /home2/ folder from the remote server to our /home/ directory

4. How to copy files and folders from a remote server:

[email protected] [/]# scp-r [email protected]:/home2/ /home/
after entering you will be asked for a password to the remote server.
[email protected]"spassword:

those. copy from the remote server everything that is in the /home2/ directory to our directory /home/

parameter: -r – recursive copying of folders (including subdirectories);

5. How to copy files from one server to another while on the third.

[email protected] [/]# scp [email protected]:/home/file1.zip [email protected]:/home2/
after entering you will be asked for a password to remote servers.
[email protected]"spassword:
[email protected]"spassword:

those. we will copy from one remote server (192.168.0.1) the file /home/file1.zip to another remote server (192.168.0.2) to the folder /home2/
being on the third server (192.168.0.3). You can copy files as well as folders using the -r option

Of course, few people will need it :) but this is possible.

Possible SCP parameters:

R - recursively copy folders (including subdirectories);

P port - use a non-standard port (default 22) - this parameter should be used if the server is waiting for a connection on a non-standard port. This setting can be useful when connecting from a firewall protected network. Running an SSH server on port 443 (used for secure HTTP connections) is The best way bypass restrictions set by the network administrator.

I hope I clearly painted how you can use SCP.

  • Goal: Escape the facility.
  • How-to: Cooperate with Researchers, Chaos Insurgents and other class D.
  • Allowed to kill: SCP, MTF, Researchers.
  • Considered teamkill: Chaos Insurgents, class D.
  • Tips:
    - Remember facility exits and spawn points of SCP, keycards, different items etc.
    - Try to find SCP-914 which can change the level of your keycards.
    - Take a good look around once in a while and also when you enter a new room.

MTF Commander and MTF Guards

  • Goal: Save the Researchers and kill everybody else.
  • How-to: The Commander comes up with a tactic and gives orders to the Guards. The Guards ensure Researchers" safety, deliver them to the evacuation point and stop the SCP from escaping the facility and/or killing Researchers.
  • Allowed to kill: class D, SCP, Chaos Insurgents.
  • Considered teamkill: MTF, Researchers.
  • Tips:
    - An SCP-106 spawn point is located near the MTF Guards" spawn point, so don"t rush straight in.
    - There's also an armory nearby which you can use to replenish your ammo.
    - It's best to leave an MTF Guard (with at least 4 level access) at gate A so that they can look after Researchers evacuating and lead them to the evacuation point.

Chaos Insurgency

  • Goal: Kill the MTF and save class D.
  • How-to: Stay away from large groups of MTF and kill off small ones. Play innocent and don't let anyone know you're a Chaos Insurgent. Try to trick the MTF giving them false info through radio, making them change direction or split.
  • Allowed to kill: MTF, SCP, Researchers.
  • Considered teamkill: Chaos Insurgents, class D.
  • Tips:
    - You look exactly like the MTF Guards so class D will try to avoid you.
    - Cooperate with other Chaos Insurgents.
    - Arm class D and help them survive.
  • Goal: Escape the facility.
  • How-to: You have the best chance to escape the facility first. You get more time because your spawn point is located near rooms with keycards and different items. Look around the rooms to find keycards of level 3 or higher, try to reach the MTF and avoid the SCP.
  • Allowed to kill: SCP, Chaos Insurgents, class D.
  • Considered teamkill: Researchers, M.T.F.
  • Tips:
    - At the start of the match, look for 3 level keycards to advance through the facility.
    - You can team up with other Researchers to use a keycard and escape together.
    - Avoid Chaos Insurgents and SCP who will try to kill you.

There are many items that can be found in this gamemode:

  • Keycards
    Keycards are needed to open certain doors
    You can find keycards of level 1 through 5 and also an Omni keycard.
  • S-NAV-300
    S-Nav 300 is a navigator that can help you find your way around the facility.
  • S-NAV Ultimate
    S-Nav Ultimate is a navigator that can help you find items and enemies.
  • Radio
    You can use a radio to communicate with other players over distance.
  • Crowbar
    A crowbar can be used to break windows or kill enemies.
  • eyedrops
    Eyedrops are useful against SCP-173; upon using them, you will stop blinking for 5 seconds.
  • Medkit
    Medkit is useful when you or your teammate is injured.
    You can heal yourself by clicking LMB and heal other players by clicking RMB.
  • armor
    There are 5 types of armor: MTF Guard armor, MTF Commander Armor, NTF Armor, Chaos Insurgent armor and Fireproof armor
    All of these are bulletproof and will reduce damage taken by 15%
    Fireproof armor also reduces damage from fire by 25%

/\
| Russian version
| Russian version
\/

  • Task: Get out of the complex.
  • : Cooperation with D, Scientists and Chaos classes. Keycard search high level, have a means of self-defense, the destruction of possible enemies.
  • Who can kill: SCP, MTF, Scientists.
  • Timkill: Chaos Insurgency, D-class.
  • Additional Information:
    - Memorize exit routes from the complex, spawn points (spawn) of all SCPs and key cards, items (crowbar, first aid kit, etc.).
    - Locate SCP-914, which can change the access level of your keycard.
    - Look around more often and when you enter the next room.

MTF Epsilon-11 and MTF IS (Guards and Commander)

  • Task: Rescue all the Scientists and kill the rest.
  • Possible ways task completion: The commander issues orders to the MTF and builds tactics. The MTF provides protection for the Scientists, escorts them to the extraction point, and prevents the SCP from escaping the facility or killing the Scientists.
  • Who can kill
  • Timkill: MTF, Scientists.
  • Additional Information:
    - There is SCP-106's spawn point near the spawn point of MTF AT, so don't run forward as fast as you can.
    - There is an armory near the spawn point of MTF SB to replenish ammo.
    - It is recommended to leave someone from the MTF (with level 4 access) at "Gate A" to control the exit of the Scientists and bring them to the extraction point.

Chaos Rebels

  • Task: Kill all the MTFs and save the D-class.
  • Possible ways to complete the task: It is advised to separate from large groups of MTFs and destroy small ones. Play innocent and don't show that you are a Chaos. You can trick the MTFs by giving them false radio data and causing them to split up or change direction.
  • Who can kill: MTF, SCPs, Scientists.
  • Timkill: D-class, Chaos Insurgency.
  • Additional Information:
    - You are no different appearance from MTF Guards, so the D-classes will shy away from you as soon as they see you.
    - Coordinate with other members of the Chaos Insurgency.
    - Arm the D-class if necessary and don't let them die.
  • Task: Get out of the complex.
  • Possible ways to complete the task: You have the best chance of getting out of the complex first. You have a large temporary margin, because your spawn point is just among the rooms with key cards and things (first aid kit, tire iron, etc.). Walk around the nearest rooms, look for maps of level 3+ and try to run to the MTF without passing SCP objects.
  • Who can kill: D-class, SCP-objects, Chaos Insurgency.
  • Timkill: Scientists, MOG.
  • Additional Information:
    - At the beginning of the round, search the rooms and look for level 3 cards to continue deeper into the complex.
    - You can negotiate with other Scientists so that everyone together find the key cards and successfully get out of the complex together.
    - At the very beginning of the round, beware of the Chaos Insurgency, SCP-objects that can be encountered on the way.

SCP objects

    As an SCP, you must kill everyone.On this moment There are 4 standard types of SCPs in game mode, but each server may have its own additional types.
  • SCP-173
    When someone looks at you, you can't move
    You have a special ability - by pressing the RMB (right mouse button) you will make everyone around you blind for a few seconds.
  • SCP-106
    When you attack someone, they teleport to your<<карманное измерение>>.
    They can get out of there, but it will be difficult.
  • SCP-049
    When you attack someone, they become infected and become SCP-049-2.
    They will be zombies that will help you infect more people.
  • SCP-457
    You are always on fire; if someone stands close enough to you, it will catch fire.
    457 is very strong against groups of opponents.
    Here are a few items that you can find in the game mode:
  • key cards
    Keycards are needed to open certain doors.
    You can find maps with levels 1-5 and an omni map.
  • SNAV-300
    S-Nav 300 is a navigator that helps you find detours.
  • SNAV Ultimate
    S-Nav Ultimate is a navigator that can display items and enemies.
  • Radio
    With the radio, you can communicate with other players over long distances.
  • mount
    With a crowbar, you can destroy windows or defend yourself from enemies.
  • Eye drops
    Eye drops are very useful against SCP-173; if you use them, you won't blink for 5 seconds.
  • first aid kit
    The first aid kit is very useful if you or one of your teammates is injured.
    To heal yourself, press LMB ( left button mouse), and to heal others, press RMB (right mouse button).
  • Armor
    Armor is divided into 5 types: MTF Security Armor, MTF Commander Armor, MTF Epsilon-11 ("Nine-Tailed Fox"), Chaos Insurgency Armor, and Fireproof Armor.
    They are all bulletproof and reduce damage taken by 15%.
    Fireproof armor is slightly different, it reduces fire damage by 25%

/\
| class information
| Other information
\/

Important

  • ENG: If you want to play this gamemode:
    1. Download every .
    2. Download the .
    3. Open up Garry's Mod, click the gamemode list on the right bottom.
    4. Choose "Breach".
    5. Start a game using the map "gm_site19".
    6. Wait for another player to join you and a match will start.
  • ENG: If you want to start playing this game mode:
    1. Download everything for the addon.
    2. Download .
    3. Launch GMOD, click on the "list of game modes" on the bottom right.
    4. Select "Breach".
    5. Start the game with the map "gm_site19".
    6. Let the second player connect to you and the game will begin.

    Commands / Commands

      ENG:
    • +zoom (MTF and Chaos Insurgents only)
      If you bind it to some key like "bind z +zoom" (without quotation marks) and press that key a menu will pop up.
      It allows you to perform many actions, e.g. playing MTF sounds or opening gate A remotely.
    • br_requestescort (MTF and Chaos Insurgents only)
      While you"re on the helipad as an MTF, this command will escort all the Researchers on the helipad. Same goes for Chaos Insurgents and class D, respectively.
    • br_requestgatea (MTF and Chaos Insurgents only)
      Opens gate A and gate RDC. If RDC is already open, the command will close both gates and gate A will no longer be affected by it.
    • br_spectate
      Makes you a spectator. Use it again to go back to player mode.
    • br_spawnzombies (Server only)
      Spawn zombies in HCZ (npc_fastzombie). It starts after doors that require 3 level keycards.
    • br_disableallhud
      Disables gamemode's HUD.
    • br_dropvest
      Takes off and drops your current armor. You can also type "dropvest" (without quotation marks) in chat.
    • br_language
      Change your game language.
      Currently available languages ​​are Russian, English, Polish and French.
    • br_livecolors
      Built-in SweetFX!
    • br_roundrestart (Server only)
      Restart the round.
    • br_roundrestart_cl (Super admin only)
      Restart the round.
    • br_scoreboardranks (Server only)
      Adds score rankings to the scoreboard (may not work well on small screens).

      ENG:

    • +zoom (MTF and Chaos Insurgency only)
      If you bind it to some button, for example: bind z +zoom, a menu should open
      In this menu, you have several actions, such as playing the sound of an MTF or opening doors remotely
    • br_requestescort (MTF and Chaos Insurgency only)
      If you are on the evacuation point (heliport), playing as an MTF, when writing this command, all Scientists who are on the evacuation point will be escorted, with D-class and Rebels this will happen too
    • br_requestgatea (MTF and Chaos Insurgency only)
      This command opens door A and door RDC (didn't find any info, so I don't know what room it is), if RDC room is already open, it will close and door A can't be opened.
    • br_spectate
      Makes you a spectator, when you re-write the command, you return to the game model.
    • br_spawnzombies (Server only)
      Spawns zombies in the HCZ zone (npc_fastzombie). This zone starts after doors that require level 3 clearance (level 3 keycard).
    • br_disableallhud
      Removes the entire HUD (where your health points, armor, name, class, etc. are shown) and game mode items
    • br_dropvest
      Your current equipped armor is discarded
    • br_language
      You can change the language of the game
      Current languages: Russian, English, Polish and French
    • br_livecolors
      Built-in SweetFX!
    • br_roundrestart (Server only)
      Restarting the round
    • br_roundrestart_cl (Super admins only)
      Restarting the round
    • br_scoreboardranks (Server only)
      Adds ratings to the scoreboard (may not work well on small screens).

Today we will talk about the SCP Secret Laboratory game, namely, how to set up and create a server in it. Fasten your seat belts, now let's go!

Setting up and running the Scp secret laboratory Server

Before you start:

Check that you have the correct port, the port you need is 7777

To set (forward) the correct port, you need to enter port forwarding (your router model) in Google and see a detailed description. It's not hard.

Go to this folder

And open the config_template file

We will not dwell on the settings much, we will only touch on the most important ones:

Mapspeed - must be changed if you no longer want the layer to be randomly generated

Intercom Max Speech Time - The amount of time you can speak on the intercom.

Friendly Fire: I advise you to disable and set the parameter to False, otherwise the game will turn into hell.

Server_IP This should be your IP! Don't know which one? Ask Google “What is my ip” and click on any link on the 1st search page

Server name: Your server name for easy lookup

Now we can start the server

Go to the Steam Library
- Looking for a game
- Click and select Launch Dedicated Server

Then go to the game folder and launch the game shortcut:

After entering the game. Click join and enter your IP.

How to close the server in Scp secret laboratory

This is really important, because you can close it only by killing the process through the task manager. It will be easy to find it, this process loads your system the most: D Well, now have a good game guys!

Almost anyone can become a member of the site and the community. We are glad to see experienced and active creative people who show interest in literary creativity and translation activities, as well as everything unusual and inexplicable. But before that, we want to make sure that you have already gained experience and understand the local culture, and will not make rash edits right away. Here are a few questions we would like answers from applicants:

  1. What role do you plan to play on the site?
  2. How many mistakes are there in the phrase "Subject must not be near SCP-████ unless specified in the test protocol."? What errors did you find?
  3. In what cases is self-voting acceptable?
  4. What SCP would you use for the benefit of humanity, and what would come of it?
  5. Tell us a little about yourself. It will be especially good if you tell about what you know how and / or what you understand. In addition, we additionally recommend that you indicate the address of your VKontakte page (if available) or other contact information to ensure fast communication resource administration with you if necessary.

You should not write a response from the character's point of view, as well as put [REDACTED] dice. We interview participants, not their characters. You should also not write about how much you like the site and how many cool ideas you have for objects - this is not something by which you can evaluate professional suitability. Especially if you are writing this. instead of questionnaires.

In addition, we note that if you apply for participation only in order to vote for articles and participate in discussions, then you can talk about it directly, no one expects and will not require you to immediately be included in the work, since translation and authoring are purely your right. However, please note that from the answers to the questions of the questionnaire, it is you does not release.

The order of consideration of applications

You can submit an application at any time, it will be registered within a day from the date of submission. Applications are considered within 3-5 (three-five) working days. Issuance of invites or refusals to participate is made on Saturdays and Sundays. If you do not receive a decision on your application this weekend, you will receive it the following Saturday or Sunday. Remember that the administration of the resource reserves the right to refuse participation without giving reasons.

Applications must be sent via Wikidot private messages to the person in charge: . In case of a positive decision, an invite will be sent to you, in case of a negative decision, a message about it. At the same time, we suggest not saving on symbols and writing about everything in detail so that you do not miss anything important.

If for any reason you are unable or do not wish to apply through Wikidot, you may use alternative channels of communication, such as: social media or messengers, you can also apply via chat in Discord. In this case, you must specify your nickname on Wikidot in the application so that you can send an invite in case of a positive decision. Without account Wikidot participation on the site is not possible.

Please note that in Wikidot settings you cannot block the acceptance of invitations from other users, otherwise we will not be able to send you an invite to the site. Make sure you check the "I want to receive invitations" checkbox. You can check this in your Wikidot profile settings.