0

When I've queried status of my ssh server which has public ip, it states following:

user@mypc:~$ sudo systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-01-19 15:10:47 CET; 1 day 8h ago
  Process: 16582 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
 Main PID: 16585 (sshd)
    Tasks: 1
   Memory: 7.9M
      CPU: 1.677s
   CGroup: /system.slice/ssh.service
           └─16585 /usr/sbin/sshd -D

Jan 19 23:48:05 mypc sshd[31641]: Received disconnect from 159.65.228.248 port 56938:11: Normal Shutdown, Thank you for playing [preauth]
Jan 19 23:48:05 mypc sshd[31641]: Disconnected from 159.65.228.248 port 56938 [preauth]
Jan 19 23:48:06 mypc sshd[31643]: Invalid user dev from 159.65.228.248
Jan 19 23:48:06 mypc sshd[31643]: input_userauth_request: invalid user dev [preauth]
Jan 19 23:48:06 mypc sshd[31643]: Received disconnect from 159.65.228.248 port 57616:11: Normal Shutdown, Thank you for playing [preauth]
Jan 19 23:48:06 mypc sshd[31643]: Disconnected from 159.65.228.248 port 57616 [preauth]
Jan 19 23:48:07 mypc sshd[31645]: Invalid user dev from 159.65.228.248
Jan 19 23:48:07 mypc sshd[31645]: input_userauth_request: invalid user dev [preauth]
Jan 19 23:48:07 mypc sshd[31645]: Received disconnect from 159.65.228.248 port 58294:11: Normal Shutdown, Thank you for playing [preauth]
Jan 19 23:48:07 mypc sshd[31645]: Disconnected from 159.65.228.248 port 58294 [preauth]

however, when I try to get more logs and detais and do

user@mypc:~$ cat /var/log/auth.log | grep sshd
Jan 20 16:45:34 mypc sshd[26979]: Did not receive identification string from 185.253.157.108
Jan 20 19:09:42 mypc sshd[27809]: Did not receive identification string from 185.253.157.111

these two are legitimate login attempts and there's no such failed preauth attempts that systemctl shows.

How do I retrieve input user auth requests the way that sshd does it?

  • I'm not sure exactly what you're looking for, but have you tried something like journalctl -u ssh | grep preauth? – steeldriver Jan 21 at 0:35
  • @steeldriver thats it, thank you! btw, expected auth log to have this entries too... – im_infamous Jan 21 at 3:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.