Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH key generation error in docs #499

Closed
cognitivegears opened this issue Sep 8, 2023 · 5 comments
Closed

SSH key generation error in docs #499

cognitivegears opened this issue Sep 8, 2023 · 5 comments
Labels
bug dependencies Pull requests that update a dependency file

Comments

@cognitivegears
Copy link
Collaborator

Describe the Bug
The ssh key generation documentation has gotten a little out of date. ssh-keygen no longer defaults to outputting RSA, but our version of ssh2 doesn't support newer algorithms. Also, the docs in config.hjson is even older and also needs updating. We should update the docs and look at updating ssh2 as well.

To Reproduce
Follow the docs to run ssh-keygen.

Expected Behavior
Enigma starts normally.

Actual Behavior

xavious@toejam:~/enigma-bbs$ ./main.js
Error initializing: Error: Cannot parse privateKey: Unsupported key format
    at new Server (/home/xavious/enigma-bbs/node_modules/ssh2/lib/server.js:247:15)
    at SSHServerModule.createServer (/home/xavious/enigma-bbs/core/servers/login/ssh.js:396:23)
    at /home/xavious/enigma-bbs/core/listening_server.js:39:36
    at /home/xavious/enigma-bbs/core/module_util.js:120:28
    at loaded (/home/xavious/enigma-bbs/core/module_util.js:93:20)
    at loadModuleEx (/home/xavious/enigma-bbs/core/module_util.js:76:12)
    at loadModule (/home/xavious/enigma-bbs/core/module_util.js:90:5)
    at /home/xavious/enigma-bbs/core/module_util.js:111:17
    at /home/xavious/enigma-bbs/node_modules/async/dist/async.js:2588:44
    at eachOfArrayLike (/home/xavious/enigma-bbs/node_modules/async/dist/async.js:506:13)
Error initializing: Error: Cannot parse privateKey: Unsupported key format
    at new Server (/home/xavious/enigma-bbs/node_modules/ssh2/lib/server.js:247:15)
    at SSHServerModule.createServer (/home/xavious/enigma-bbs/core/servers/login/ssh.js:396:23)
    at /home/xavious/enigma-bbs/core/listening_server.js:39:36
    at /home/xavious/enigma-bbs/core/module_util.js:120:28
    at loaded (/home/xavious/enigma-bbs/core/module_util.js:93:20)
    at loadModuleEx (/home/xavious/enigma-bbs/core/module_util.js:76:12)
    at loadModule (/home/xavious/enigma-bbs/core/module_util.js:90:5)
    at /home/xavious/enigma-bbs/core/module_util.js:111:17
    at /home/xavious/enigma-bbs/node_modules/async/dist/async.js:2588:44
    at eachOfArrayLike (/home/xavious/enigma-bbs/node_modules/async/dist/async.js:506:13)
xavious@toejam:~/enigma-bbs$

Environment
N/A

@NuSkooler
Copy link
Owner

Related #399

@shawnyeager
Copy link

Is there a quick fix for this by way of a parameter passed to openssl?

@cognitivegears
Copy link
Collaborator Author

Is there a quick fix for this by way of a parameter passed to openssl?

Yes - you can just pass -t rsa to openssl to generate a RSA key.

@cognitivegears
Copy link
Collaborator Author

The documentation has been updated, as well as an update to the ssh2 library in PR #515. The updated ssh2 does support ECDSA, however we still don't want to use it (in most cases) because some old ssh clients like Netrunner don't like it still.

@cognitivegears cognitivegears added bug dependencies Pull requests that update a dependency file labels Oct 11, 2023
@cognitivegears
Copy link
Collaborator Author

Closing this issue as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

3 participants