Categories
Knowledge Support Cloudvue Cloudvue Cameras Support Categories Products

Adding an Authorized Public SSH Key to a C2C

Description 

SSH access to Cloudvue C2C devices  depends  on  RSA public/private key pairs.  Public keys for L3 Cloudvue support were added into the Cloudvue production software with the release of 22.9.0 in January of 2023.   The following instructions can be used to temporarily add a public ssh key to a C2C device.  SSH public keys added in this fashion will not survive a normal Cloudvue software update.

Product 

  • Cloudvue C2C

Solution

Prerequisites

  • If one does not already exist you will need to generate an ssh key pair, see Knowledge Base Article #13051 “Cloudvue SSH Tunneling” for details
  • A copy of your public key, the contents of (~/.ssh/id_rsa.pub)

Find a Buddy

You will need to get the assistance of someone who already has ssh access to the camera to SSH into the camera and make the necessary changes

Extract Cloudvue Software

Run the following command on the C2C to extract the contents of the Cloudvue software tarball into a temporary folder for editing:

mkdir -p /tmp/tBall && tar -xf smartvue.tar.gz -C /tmp/tBall

Add Public Key

Edit the authorized_keys file and add the new public key using vi

NOTE: vi is the only text editor available

vi /tmp/tBall/home/smartvue/.ssh/authorized_keys
  • Each authorized users will be listed along with their public ssh-rsa key (see example)
  • Insert your information at the bottom of this file beginning with a comment “#” and your name then followed by a line with your public key
  • How you paste will depend  on the program you are using to SSH. In PuTTY it’s just right clicking on the window, in other terminals you may need to right-click and then choose paste in the menu that pops up.
  • vi commands
    • G – Uppercase letter “G” goes to the bottom of the file
    • o – lowercase letter “o” inserts a line below the current line and goes into editing mode
    • ⏎ – Enter key creates a new line below the current one (just putting this here to be thorough)
    • ␛ – Escape key exits “insert mode” in vi
    • :wq⏎ – colon opens up a prompt to type a command, the w  stands for “write” and will save the changes, the q stands for “quit” and will exit vi, Enter key runs the command
    • q!⏎ – If you ever need to quit without saving, leave out the w and add an ! after the q (that tells it to force quit ignoring any changes), Enter key runs the command

Recreate Tarball

Use the following command to recreate the cloudvue software tarball and cleanup temporary files

cd /tmp/tBall && tar -czf ~/smartvue.tar.gz * && cd ~ && rm -rf /tmp/tBall

Install the Cloudvue Software

This will apply the new changes.  A reboot is not necessary since we aren’t modifying any running services

tar -xf ~/smartvue.tar.gz -C /