This article describes how to enable an edge node for SSH access.
Prerequisites
Docker must be running on your machine.
Enable SSH for an edge device
- Check if you have an SSH key.
cat ~/.ssh/id_rsa.pub
If you don't have an SSH key:Create a key, specify the type, and follow the prompts.ssh-keygen -t rsa
- Copy the output of the "cat" command.
- Run the ZCLI container.
docker run -it -v $PWD:/root zededa/zcli:latest
- Log in to the ZCLI
- Enable SSH access by pushing the SSH key to the device.
zcli edge-node update EDGE_NODE --config=debug.enable.ssh:"YOUR_PUBLIC_KEY"
- Find the IP address of your edge node and save it for later use.
zcli edge-node show EDGE_NODE --detail
- Exit the ZCLI to your machine's standard command line.
exit
- Connect to the device via SSH using the corresponding private key.
ssh -i YOUR_PRIVATE_KEY_PATH root@DEVICE_IP
Examplessh -i ~/.ssh/id_rsa root@192.0.2.119
Disable SSH for an edge device
- Log in to the ZCLI
- Disable SSH for your edge device by removing all the public keys from the device.
zcli edge-node update EDGE_NODE --config=debug.enable.ssh:""
- Verify that your public key is gone.
zcli edge-node show EDGE_NODE --detail