what is not working as you expected it to, what did you expect?
that’s all?
what are the journalctl logs saying about it?
is sshd receiving the key?
No, it don’t works!
swap the order
It’s not our fault you can’t read and use google
Already done, it’s dont work
have you tried turning it on and back off again
Yes, and systemctl restart
~ $ sudo /sbin/sshd
~ $ ssh git@127.0.0.1
Last login: Thu Aug 18 16:08:22 2022 from 127.0.0.1
[git@fedora ~]$
I want this by systemctl start sshd
~ $ systemctl status sshd
● sshd.service – OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2022-08-18 16:09:08 MSK; 9s ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 12703 (sshd)
Tasks: 1 (limit: 38392)
Memory: 1.3M
CPU: 10ms
CGroup: /system.slice/sshd.service
└─ 12703 “sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups”
авг 18 16:09:08 fedora systemd[1]: Starting sshd.service – OpenSSH server daemon…
авг 18 16:09:08 fedora sshd[12703]: Server listening on 0.0.0.0 port 22.
авг 18 16:09:08 fedora sshd[12703]: Server listening on :: port 22.
авг 18 16:09:08 fedora systemd[1]: Started sshd.service – OpenSSH server daemon.
~ $ ssh git@127.0.0.1
git@127.0.0.1’s password:
~ $ systemctl status sshd
● sshd.service – OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2022-08-18 16:09:08 MSK; 16s ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 12703 (sshd)
Tasks: 1 (limit: 38392)
Memory: 1.3M
CPU: 33ms
CGroup: /system.slice/sshd.service
└─ 12703 “sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups”
авг 18 16:09:08 fedora systemd[1]: Starting sshd.service – OpenSSH server daemon…
авг 18 16:09:08 fedora sshd[12703]: Server listening on 0.0.0.0 port 22.
авг 18 16:09:08 fedora sshd[12703]: Server listening on :: port 22.
авг 18 16:09:08 fedora systemd[1]: Started sshd.service – OpenSSH server daemon.
авг 18 16:09:23 fedora sshd[12730]: Connection closed by authenticating user git 127.0.0.1 port 36502 [preauth]
But got this
~ $ systemctl status sshd
● sshd.service – OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2022-08-18 16:09:08 MSK; 9s ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 12703 (sshd)
Tasks: 1 (limit: 38392)
Memory: 1.3M
CPU: 10ms
CGroup: /system.slice/sshd.service
└─ 12703 “sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups”
авг 18 16:09:08 fedora systemd[1]: Starting sshd.service – OpenSSH server daemon…
авг 18 16:09:08 fedora sshd[12703]: Server listening on 0.0.0.0 port 22.
авг 18 16:09:08 fedora sshd[12703]: Server listening on :: port 22.
авг 18 16:09:08 fedora systemd[1]: Started sshd.service – OpenSSH server daemon.
~ $ ssh git@127.0.0.1
git@127.0.0.1’s password:
~ $ systemctl status sshd
● sshd.service – OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2022-08-18 16:09:08 MSK; 16s ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 12703 (sshd)
Tasks: 1 (limit: 38392)
Memory: 1.3M
CPU: 33ms
CGroup: /system.slice/sshd.service
└─ 12703 “sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups”
авг 18 16:09:08 fedora systemd[1]: Starting sshd.service – OpenSSH server daemon…
авг 18 16:09:08 fedora sshd[12703]: Server listening on 0.0.0.0 port 22.
авг 18 16:09:08 fedora sshd[12703]: Server listening on :: port 22.
авг 18 16:09:08 fedora systemd[1]: Started sshd.service – OpenSSH server daemon.
авг 18 16:09:23 fedora sshd[12730]: Connection closed by authenticating user git 127.0.0.1 port 36502 [preauth]
to me this looks like it’s working
Last login: Thu Aug 18 16:08:22 2022 from 127.0.0.1
[git@fedora ~]$
vs
~ $ ssh git@127.0.0.1
git@127.0.0.1’s password:
Last login: Thu Aug 18 16:08:22 2022 from 127.0.0.1
[git@fedora ~]$
vs
~ $ ssh git@127.0.0.1
git@127.0.0.1’s password:
oh, you’re not getting authenticated when logging in
debug1: Offering public key: /home/user/.ssh/id_rsa RSA SHA256:LyZwuuY4bTecXd4+LPpmc+CneBTr2lkyUjq5A8QBEmw agent
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
that’s all?
It’s trouble. If sshd starting from command line:
debug1: Server accepts key: /home/user/.ssh/id_rsa RSA SHA256:LyZwuuY4bTecXd4+LPpmc+CneBTr2lkyUjq5A8QBEmw agent
debug3: send packet: type 50
debug3: receive packet: type 52
what are the journalctl logs saying about it?



we can clearly see the sshd server accepting the connection, but is waiting for authentication after i accept the request

we can also see this happening in the logs