threefoldtech / tfgrid-sdk-ts

Apache License 2.0
4 stars 8 forks source link

Private SSH Key error in Caprover #854

Closed AlaaElattar closed 1 year ago

AlaaElattar commented 1 year ago

I want trying to add my ssh private key to join as a worker node in caprover cluster, but it gives my error that something bad went bad. I did ssh to the leader node to get logs, that's what i found

July 26th 2023, 12:48:03.648 pm Error: Cannot parse privateKey: Unsupported key format Error: Cannot parse privateKey: Unsupported key format at Client.connect (/usr/src/app/node_modules/ssh2/lib/client.js:261:15) at /usr/src/app/built/docker/DockerUtils.js:54:22 at new Promise () at /usr/src/app/built/docker/DockerUtils.js:16:20 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5) POST /api/v2/user/system/nodes 500 14.746 ms - 21

That's probably because my private key is OPENSSH not RSA private key. I think maybe we should support more than one type of keys or just document for users to user only RSA Private Key.

zaelgohary commented 1 year ago

A note will be added to the docs to make sure users only use SSH keys of RSA formats only. The issue should be verified once this is closed.

zaelgohary commented 1 year ago

A note is added to the manual for SSH format.

image

xmonader commented 1 year ago

It there on the staging server https://www2.manual.grid.tf/playground/caprover.html