You are not logged in.
I'm setting up sshd_config and I have this section:
Host *
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
PubkeyAuthentication yes
HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa
PasswordAuthentication no
When this section is present, and I try to ssh in from windows
ssh: connect to host [********] port 22: Connection refused
If I comment out the line Host *, then I am able to connect with my public key (which I have already set up).
Elsewhere in my sshd_config I have
UsePAM yes
PubkeyAuthentication yes
PasswordAuthentication no
ChallengeResponseAuthentication no
and a couple other things that seem less likely to be interfering (like PrintMotd no)
I've read https://wiki.archlinux.org/title/OpenSSH but a lot of it I was not sure what applied to me. I based my config on https://stribika.github.io/2015/01/04/s … shell.html which I did pretty much understand.
Last edited by emjustem (2022-10-27 22:05:02)
Offline
I'm setting up sshd_config and I have this section:
Recommended /etc/ssh/ssh_config snippet:
And "Hosts *" has neither business nor sense in sshd_config. It's an invalid line and you should™ get an error for that.
Offline
add '-v' for verbose and check what is going wrong while connecting
Offline
Delete '~/.ssh/known_hosts' and start the server manually with 'sshd -dd'.
sys2064
Offline
I'm setting up sshd_config and I have this section:
…
If I comment out the line Host *, then I am able to connect with my public key (which I have already set up).
"Hosts *" has neither business nor sense in sshd_config. It's an invalid line and you should™ get an error for that.
Offline
Did you mix up the sshd_config with ssh_config?
Offline
Yep I just mixed up the configs. Thanks!
Offline