Enhance peer logging to include username and peer name when using netbird ssh #193

Open
opened 2025-11-20 05:07:44 -05:00 by saavagebueno · 3 comments
Owner

Originally created by @finnje on GitHub (Sep 23, 2022).

When you log into a peer via netbird ssh you get a line in the peers logs such as:

Sep 23 17:26:58 <hostname> login[92347]: ROOT LOGIN  on '/dev/pts/2' from '100.103.62.186'

For auditing purposes it would be super helpful to extend this log and have it look something like this

Sep 23 17:26:58 <hostname> login[92347]: ROOT LOGIN  on '/dev/pts/2' from 'user01@100.103.62.186'

and once the peer DNS feature is complete ultimately look something like this. (netbird_machine01=100.103.62.186)

Sep 23 17:26:58 <hostname> login[92347]: ROOT LOGIN  on '/dev/pts/2' from 'user01@netbird_machine01'
Originally created by @finnje on GitHub (Sep 23, 2022). When you log into a peer via `netbird ssh` you get a line in the peers logs such as: ``` Sep 23 17:26:58 <hostname> login[92347]: ROOT LOGIN on '/dev/pts/2' from '100.103.62.186' ``` For auditing purposes it would be super helpful to extend this log and have it look something like this ``` Sep 23 17:26:58 <hostname> login[92347]: ROOT LOGIN on '/dev/pts/2' from 'user01@100.103.62.186' ``` and once the peer DNS feature is complete ultimately look something like this. (_netbird_machine01=100.103.62.186_) ``` Sep 23 17:26:58 <hostname> login[92347]: ROOT LOGIN on '/dev/pts/2' from 'user01@netbird_machine01' ```
saavagebueno added the ssh label 2025-11-20 05:07:44 -05:00
Author
Owner

@mlsmaycon commented on GitHub (Jul 7, 2023):

@finnje we've added the logs SSH connections. It doesn't contain the DNS name yet. Here is an example of a log:

2023-07-02T15:29:43+02:00 INFO client/ssh/server.go:148: Establishing SSH session for root from host 100.127.15.245:60568
@mlsmaycon commented on GitHub (Jul 7, 2023): @finnje we've added the logs SSH connections. It doesn't contain the DNS name yet. Here is an example of a log: ```shell 2023-07-02T15:29:43+02:00 INFO client/ssh/server.go:148: Establishing SSH session for root from host 100.127.15.245:60568 ```
Author
Owner

@hwinkel commented on GitHub (Feb 27, 2024):

Slightly related, can you add SSH session recording?

@hwinkel commented on GitHub (Feb 27, 2024): Slightly related, can you add SSH session recording?
Author
Owner

@xadhoom commented on GitHub (Aug 2, 2024):

Would be also super useful to ( optionally? ) logs ssh connections on the activity stream, too

@xadhoom commented on GitHub (Aug 2, 2024): Would be also super useful to ( optionally? ) logs ssh connections on the activity stream, too
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#193