SCP (secure copy) is a command-line utility that allows you to securely copy files and directories between two locations. With scp , you can copy a file or directory: From your local system to a remote system.

It uses the same authentication and security as it is used in the Secure Shell (SSH) protocol. SCP is known for its simplicity, security and pre-installed availability.

When you launch an instance on Q Blocks, you can access it either through Jupyter Lab or through Terminal SSH.

SSH access to your Q Blocks instances is controlled via:

  1. Password, and
  2. Secure public private key pair

While accessing your instance, you can download your private SSH key or use password for authentication. For the sake of this scp example, we will use SSH Key based authentication.

To get started, please follow the steps mentioned below:

  1. Go to the instances page in your Q Blocks Dashboard.

  2. Click on "Select an action" button on your instance and then choose the "Connect" option.

  3. Copy the SSH port of your instance as shown in the image below:

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/03527970-d041-4bbf-a028-da1dae6ba1f7/ssh-port.png

  4. Copy the Hostname of your instance:

    1. In the above image, you can see our example hostname is: jeu.qblocks.cloud.
    2. It will be different in your case but you need to copy your hostname for running scp command.
  5. Go to your terminal and execute the following scp command:

    scp -i /PATH/TO/SSH/KEY -P SSH_PORT /PATH/TO/LOCAL_FILE qblocks@HOSTNAME:/home/qblocks/
    
  6. In the above command we specify the following:

    1. /PATH/TO/SSH/KEY for using it as authentication.
    2. SSH_PORT is our instance's SSH Port.
    3. /PATH/TO/LOCAL_FILE is the source path of the file that will be uploaded using SCP. You may even specify a folder path for upload.
    4. qblocks is the default user of your instance. You can create new users as well in your instance and use its password or ssh key for scp.
    5. HOSTNAME is your instance's hostname.
    6. /home/qblocks/ is the destination path where you want the data to be uploaded in your instance. You may specify any particular existing path in your instance as a destination path.

    This should help you quickly upload any file or data to your Q Blocks instance using scp.

    If you still face issues then don't hesitate to reach out to us at: [[email protected]](mailto:[email protected]?subject=Unable%20to%20launch%20TensorBoard)