shazow / ssh-chat

Chat over SSH.
https://shazow.net/posts/ssh-how-does-it-even/
MIT License
5.59k stars 408 forks source link

Identity parsing error for ssh key #320

Closed ParanoidAndroid-42 closed 5 years ago

ParanoidAndroid-42 commented 5 years ago

I'm trying to get ssh-chat running on a raspberry pi B+ but I have encountered an issue.

The pi is running the September 2019 version of Raspbian Buster Lite. I'm using go version go1.11.6 linux/arm and ssh-chat version 1.8.2

The installation process went fine. I used "sudo ssh-keygen -t rsa -N '' -f /root/.ssh/id_rsa" to generate the key. I checked and the files did appear to be created successfully.

I tried to run "sudo systemctl start ssh-chat" to start the service but when I checked the status it returned "loaded failed failed"

I then tried just running "sudo ssh-chat" but I got "Failed to parse key: ssh: unhandled key type".

I also tried "ssh-chat --verbose --bind ":22" --identity "/root/.ssh/id_rsa"" but got the same error

Thanks for the help!

shazow commented 5 years ago

Hmm. Could you try making a key without specifying the type? (Drop the -t rsa flag?)

ParanoidAndroid-42 commented 5 years ago

It looks like it defaults to rsa when you don't specify the type

shazow commented 5 years ago

@ParanoidAndoid If you don't mind, could you generate one of these keys as a throw-away and share the contents here, both the pub and private one? (Make sure to not use them) I'll try to reproduce this error on my end.

ParanoidAndroid-42 commented 5 years ago

rsa public: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDD2txVaffun8ZnD7N+h88kphNbmV2iuWEsO36XjVsyLQzlUx+qrolVlCUB8r6VrNafy5L8anAHfoNz$

rsa private: -----BEGIN OPENSSH PRIVATE KEY----- b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn NhAAAAAwEAAQAAAQEAw9rcVWn37p/GZw+zfofPJKYTW5ldorlhLDt+l41bMi0M5VMfqq6J VZQlAfK+lazWn8uS/GpwB36Dc1HTXBILFsfOQIJwGykQpSI6WddyDzEiE0CIiMJqI1vWD0 q8wdRUlPsqTZetd4uwaUyc0tuPc1DS1rbWgndhCU0ueCHU0BG7oBp1SbJN85poL2sNg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D5X6PuPBhZ+oAM72xCfdvjNYoy4T3YHTNs0m5iSA1jgZZwYOLFenr8 V3OiEtHCePvBPpvcxHJbw4DEVOEchQgV5lCPReF8Omj27fplgMtP2oCUNjqrJKkiDoKYfP Tl6S1lod5Fl182MH4KgqKYVCsWlv3tOvFXCusTCdCT5eWZKwAAAIEAyQ8pFPucnFnK4flr 7QnZVuQFTDh45dlihdWy8QeAPK7sXtwSXFk9jel2WKyUPLFs9MjuoEp+gZG0EhI09Tg8RL JhHY45KSjf7vnwafcC1sOlLUbe/liBehsPNo870lVztdeoKp7LXHwvwaLucVUP+xn4McJH to2Si0lUIIqC9VMAAAAQcm9vdEByYXNwYmVycnlwaQECAw== -----END OPENSSH PRIVATE KEY-----

Also tried dsa.

dsa public: ssh-dss AAAAB3NzaC1kc3MAAACBAIyUfEuKc4V0+nKVMyWzGACZp2QfiH8fQlaqQF+GtZP0vgEM3VdOTnObC30JddVKfRpnD31PAb5RhEZ4mzW8tase$

dsa private: -----BEGIN OPENSSH PRIVATE KEY----- b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABsgAAAAdzc2gtZH NzAAAAgQCMlHxLinOFdPpylTMlsxgAmadkH4h/H0JWqkBfhrWT9L4BDN1XTk5zmwt9CXXV Sn0aZw99TwG+UYRGeJs1vLWrHqMQFE9EcGa5UH8uIuPmT7IhuVQGA1H4p/JLpoE8z9SP7n YVv63qChew4VLjSoSLMSWv3pI+l2hJsBNzI4BfMQAAABUAwaZ590ena0OEao0ooyoGO0+Q 9NEAAACASdMi57BZpTvgKamjpoSFSzKebt+khWhZBYmFel+1qMSgHnkxbZoMxpTZ9/MuJM v/a9EFYaOMdVkmijMgh0FAwrQCvt0fMPRTQVSpwVdo/clLjDqaV/l+c3/pvynWO91RaA0a GPewCZ+8CCC4Sf+tMD856DbTOlU76/OBEfwVYeAAAACBAITE0dTJNSSbRW8TebcOk/5CL8 dxR8NG1ldeV+/UDCd10LOpahOfktV/8gZYJwFPMYT/yK37aTJjksDc4MSwKd7iKn7Gj2Y0 id5q5Om84mrZy8icAD2Wkjn0Fj8f4x83cI+6PRi/Y0tHZ+YiG1yA1L42RehifaoaaDm7Ut xI0rksAAAB6NL3cLLS93CyAAAAB3NzaC1kc3MAAACBAIyUfEuKc4V0+nKVMyWzGACZp2Qf iH8fQlaqQF+GtZP0vgEM3VdOTnObC30JddVKfRpnD31PAb5RhEZ4mzW8taseoxAUT0RwZr lQfy4i4+ZPsiG5VAYDUfin8kumgTzP1I/udhW/reoKF7DhUuNKhIsxJa/ekj6XaEmwE3Mj gF8xAAAAFQDBpnn3R6drQ4RqjSijKgY7T5D00QAAAIBJ0yLnsFmlO+ApqaOmhIVLMp5u36 SFaFkFiYV6X7WoxKAeeTFtmgzGlNn38y4ky/9r0QVho4x1WSaKMyCHQUDCtAK+3R8w9FNB VKnBV2j9yUuMOppX+X5zf+m/KdY73VFoDRoY97AJn7wIILhJ/60wPznoNtM6VTvr84ER/B Vh4AAAAIEAhMTR1Mk1JJtFbxN5tw6T/kIvx3FHw0bWV15X79QMJ3XQs6lqE5+S1X/yBlgn AU8xhP/IrftpMmOSwNzgxLAp3uIqfsaPZjSJ3mrk6bziatnLyJwAPZaSOfQWPx/jHzdwj7 o9GL9jS0dn5iIbXIDUvjZF6GJ9qhpoObtS3EjSuSwAAAAUCidtlXgQWWWAzzurrLgJrz3K KV0AAAAQcm9vdEByYXNwYmVycnlwaQEC -----END OPENSSH PRIVATE KEY-----


From: Andrey Petrov notifications@github.com Sent: Tuesday, October 15, 2019 11:37 AM To: shazow/ssh-chat ssh-chat@noreply.github.com Cc: ParanoidAndoid nfuentes89@hotmail.com; Mention mention@noreply.github.com Subject: Re: [shazow/ssh-chat] Problem running ssh-chat on raspberry pi (#320)

@ParanoidAndoidhttps://github.com/ParanoidAndoid If you don't mind, could you generate one of these keys as a throw-away and share the contents here, both the pub and private one? (Make sure to not use them) I'll try to reproduce this error on my end.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/shazow/ssh-chat/issues/320?email_source=notifications&email_token=ABKUDKR6YJK7KOTGZTROMG3QOYEV3A5CNFSM4JA7XQCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBJZHUI#issuecomment-542348241, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABKUDKWGARSKLC4IJSIQHALQOYEV3ANCNFSM4JA7XQCA.

shazow commented 5 years ago

I uploaded a fresh build using Go1.13 here: http://tmp.shazow.net/ssh-chat-linux_arm.tgz

I'm told it works now! Closing this issue, will need to do a fresh release soon.