trying to generate an ssh key to use with balena cl. keep getting the message “should match pattern “^(ssh-rsa|ssh-dss|ssh-ed25519|ecdsa-sha2-nistp256|ecdsa-sha2-nistp384|ecdsa-sha2-nistp521) [A-Za-z0-9+/=]+( [^ ]+)*$””
the reason im trying to generate a new key is because balena CL stopped working for me. was getting the following message : kex_exchange_identification: read: Connection reset
SSH: Remote command “host xxxxx” exited with non-zero status code “255”
ly using sudo
?
Hi Adam, welcome to Balena forums. Can you please clarify what commands you are trying to use to generate a new ssh key and also what operating system are you running the command on?
Sure. So I used puttygen to create an SSH key then I converted it using ssh-keygen -i -f .pub. Then I add the key to balena. When I try to balena CLI I get the " Connection reset
SSH: Remote command “host xxxxx” exited with non-zero status code “255”
ly using sudo
?" message.
Very possible that I’m an idiot and doing this wrong so any help is much appreciated!
Also I am using Windows OS.
Thanks
Adam
Hi Adam, could you please use the commands specified in this documentation: Generating a new SSH key and adding it to the ssh-agent - GitHub Docs.
Please use the command ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
to generate your key pair and then add it using balena key add Main <your key location>
No luck. So i created and added the key using the brower and pulling it from Github. I also tried adding it using balena key add Keyname <your key location (local on my machine)>
Same error
Scratch that it seems to be working now. Thanks for the help!
Glad to hear you got it working. Please let us know if there was something in particular that helped so we can prevent this in the future. And of course, if any further issue crops up just reach out!