Skip to main content

Add ssh-key

Functionality

The SSH key functionality in the WCC Lite device allows you to authenticate securely without needing to enter a password each time you access the device via SSH. This method uses public-key cryptography to ensure a secure connection.

This feature enables you to paste public SSH keys into the provided interface, granting access to users whose private keys match the uploaded public keys. This enhances security and simplifies the login process.

The add SSH key functionality was implemented in WCC Lite starting from firmware version v1.9.3.

Generating SSH Keys


To use this functionality, you first need to generate an SSH key pair on your local machine. Here are the steps for generating a key pair:

1. Open a terminal window.
2. Run the following command:

 ssh-keygen

3. Follow the prompts:

  • You will be asked to enter a file in which to save the key. Press Enter to accept the default location.
  • Enter a passphrase for additional security, or leave it empty for no passphrase


image-1721655057265.png

4. The generated keys will be saved in the `.ssh` directory in your home folder. The public key will be named `id_rsa.pub` and the private key `id_rsa`.


Adding the Public Key to the WCC Lite Device


1. Copy the content of your public key:
   

cat ~/.ssh/id_rsa.pub

image-1721721321085.png

2. Access the WCC Lite web interface and navigate to the SSH-KEYS section. System -> Administration

image-1721653963899.png


3. Paste the copied public key into the text box provided. Ensure that each key is on a new line if you are adding multiple keys.

image-1721654024569.png


4. Save the changes to apply the new keys.

image-1721653982535.png

Using the SSH Key for Authentication


After adding the public key to your WCC Lite device, you can now authenticate using the corresponding private key without entering a password.

1. Open a terminal window.
2. Use the SSH command to connect to your device:
   

ssh root@192.168.1.1

Replace `root` with the username (which is `root` in this case) and `192.168.1.1` with the IP address of your WCC Lite device.

You should now be able to access the WCC Lite device securely and conveniently using your SSH key pair.