Solved How do I check status and logs of the ssh in Debian?

Solved issue

CaffeineAddict

Well-Known Member
Joined
Jan 21, 2024
Messages
564
Reaction score
349
Credits
4,731
I'm using SSH primarily for GitHub and I want to check status of my ssh-agent (or what ever it is called) in Debian and also to check for it's logs, however I'm not able to find it with systemctl

Bash:
sudo systemctl list-units | grep ssh

Provides: <no output>

How to find which one is it? how is it called?
And also where are the logs?

EDIT:
The package which is installed is openssh-client, there is no ssh server installed.
 


I want to check status of my ssh-agent

what do you mean by status?

sudo systemctl list-units | grep ssh

Your workstation doesn't have a sshd (emphasis on the d - daemon). That would be a systemd service. your ssh is just a client program. That has no daemon and no systemd service.

On a server it provides output:

Code:
$ sudo systemctl list-units | grep ssh
  ssh.service                                                              loaded    active running   OpenBSD Secure Shell server

And also where are the logs?

For ssh or sshd?
 
If you are looking for logs for outgoing ssh sessions not sure tbh.

Its like if you run echo or cat - not sure if that logs something by default.

The server you log IN to definitely has logs though. those are in the systemd journal of the server.

Btw you can track what you do on a workstation, but I kinda think thats nonsense as you can also just disable it (as you commonly have access to root on your own workstation).
 
auditd logs EVERYTHING thats happening on your system. It doesnt check logs for you, it creates a TON of more logs.

Its super fun to look at. You will need a tool to manage the flood of logs though.

If you run a bank, that might be for you.
 
auditd logs EVERYTHING thats happening on your system. It doesnt check logs for you, it creates a TON of more logs.

Its super fun to look at. You will need a tool to manage the flood of logs though.
Well in that case I'll opt out because I don't want to spam my system with even more logs, those few that are there on Debian are good enough to play with to boost my log interpretation skills, because that's all I really aim for :)

If you run a bank, that might be for you.
Maybe after reincarnation or something I will lol
 

Members online


Top