✅ Can't connect to sshd on macOS #414
-
I can connect using webssh to a Linux box using private/public keys but when I try to do the same to a macOS box, it fails with "Provided credentials are bad". What credentials? The host key? The private key on the iPhone? I've tried with different vers of macOS from 10.13 - 11.6. As far as I can tell, the connection profiles of the on that works and the ones that fail are the same (with differentt hostnames/IPs, of course). ssh between the macOS boxes work just fine. I'm clearly missing something; any ideas? How can I do the equivalent of "ssh -v" so I can see what's going on? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hello @swathanasin 👋 The "alternative" of
Have a nice day ☀️ |
Beta Was this translation helpful? Give feedback.
-
Could you post an example of a unused keypair?
Sorry, not sure what you want here. As I wrote, I can’t remember how I generated the keypair that the iPhone currently uses, but the private key is:
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,C711CF9A2A45447B
….
UnKoWRhfocF7r7nAHFy18Al3L4qsGJ5h2vd3nq8dsZk=
-----BEGIN RSA PRIVATE KEY-----
The pub key is
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIB09VkXboPXPsS752eaAamIWrNA98SnQmHIvIVliSpWl4dVXu7xUvslcOkz9jSW97Bb/xFGJ5fuzmR4fjWuNMhi20sf1LixklCPfyMoIikWB8/oorpmLO1CGCQYywKyYqrYS5x4Qn4L6upP+VtsfyzpqSdQPCWnFEmFvRLm3GRr2w== 8457c6b8ca9fef77be4504b7899344e2746a2b65-iphone-rsa-key-20100628
(Wow, 11 years ago!)
This keypair works with my (Centos 7) VPSes, but not with the macOS sshd. I don’t know where macOS logs its auth failures - they aren’t in /var/log/system.log -, so I don’t know what it’s objecting to.
You can generate a PEM keypair by the use of : ssh-keygen -t rsa -b 4096
Thanks; I’ll try that.
Regards
Sak
|
Beta Was this translation helpful? Give feedback.
Hello @swathanasin 👋
The "alternative" of
ssh -v
on WebSSH is to enable verbose logging :Have a nice day ☀️