I've set up Cygwin on a Windows machine, with the OpenSSH server sshd as a Windows service, up and running. I used ssh-host-config -y; and in /etc/sshd_config I've uncommented: PubkeyAuthentication Yes.
On the client side - I'm starting off with what should be the simplest thing - the same machine, in Cygwin. The user is a Windows domain user, so let's call him MyDom\JoeUser. Some more info:
MyDom+JoeUser@mymachine ~ $ ls -lad .ssh/* -rw------- 1 MyDom+JoeUser MyDom+JoeUser 4971 Dec 3 15:40 .ssh/authorized_keys -rw------- 1 MyDom+JoeUser MyDom+JoeUser 525 Dec 3 13:56 .ssh/id_ecdsa -rw-r--r-- 1 MyDom+JoeUser MyDom+JoeUser 187 Dec 3 13:56 .ssh/id_ecdsa.pub -rw------- 1 MyDom+JoeUser MyDom+JoeUser 1675 Dec 3 13:57 .ssh/id_rsa -rw-r--r-- 1 MyDom+JoeUser MyDom+JoeUser 401 Dec 3 13:57 .ssh/id_rsa.pub -rw------- 1 MyDom+JoeUser MyDom+JoeUser 91 Dec 3 13:52 .ssh/known_hosts and I made sure the authorized_keys has the line in id_rsa.pub. Now, when I try to connect, this happens (snipped some less-interesting lines:
$ ssh -v localhost OpenSSH_9.9p1, OpenSSL 3.0.15 3 Sep 2024 --- snip --- debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: publickey debug1: Will attempt key: /home/JoeUser/.ssh/id_rsa RSA SHA256:redacted debug1: Will attempt key: /home/JoeUser/.ssh/id_ecdsa ECDSA SHA256:redacted debug1: Will attempt key: /home/JoeUser/.ssh/id_ecdsa_sk debug1: Will attempt key: /home/JoeUser/.ssh/id_ed25519 debug1: Will attempt key: /home/JoeUser/.ssh/id_ed25519_sk debug1: Will attempt key: /home/JoeUser/.ssh/id_xmss debug1: Offering public key: /home/JoeUser/.ssh/id_rsa RSA SHA256:redacted Connection closed by ::1 port 22 and if I try connecting using just my plain username:
$ ssh -v JoeUser@localhost OpenSSH_9.9p1, OpenSSL 3.0.15 3 Sep 2024 --- snip --- debug1: kex_ext_info_client_parse: server-sig-algs=<ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256> debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: publickey debug1: Will attempt key: /home/JoeUser/.ssh/id_rsa RSA SHA256:redacted debug1: Will attempt key: /home/JoeUser/.ssh/id_ecdsa ECDSA SHA256:redacted debug1: Will attempt key: /home/JoeUser/.ssh/id_ecdsa_sk debug1: Will attempt key: /home/JoeUser/.ssh/id_ed25519 debug1: Will attempt key: /home/JoeUser/.ssh/id_ed25519_sk debug1: Will attempt key: /home/JoeUser/.ssh/id_xmss debug1: Offering public key: /home/JoeUser/.ssh/id_rsa RSA SHA256:redacted debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Offering public key: /home/JoeUser/.ssh/id_ecdsa ECDSA SHA256:redacted debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Trying private key: /home/JoeUser/.ssh/id_ecdsa_sk debug1: Trying private key: /home/JoeUser/.ssh/id_ed25519 debug1: Trying private key: /home/JoeUser/.ssh/id_ed25519_sk debug1: Trying private key: /home/JoeUser/.ssh/id_xmss debug1: Next authentication method: keyboard-interactive debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: password JoeUser@localhost's password: ... but the password is not accepted.
As far as the server log goes, this is what I get:
Dec 3 16:12:21 mymachine sshd-session: PID 2620: fatal: seteuid 4096: Function not implemented Dec 3 16:13:39 mymachine sshd-session: PID 2623: Invalid user JoeUser from ::1 port 55645 Dec 3 16:14:45 mymachine sshd-session: PID 2623: Connection closed by invalid user JoeUser ::1 port 55645 [preauth] My questions:
- What user should I connect as?
- What must I do to make
cygsshdaccept my attempt to connect? - Why am I getting these errors instead of the authentication just succeeding?