Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/admin-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ session dev/squad-worker-g1-0 using forestage adapter # adapter selection
session dev/squad-worker-g1-0 running in pane %5 # session created
health: session ... failed (restart_policy=always) # health failure
shift: initiated for dev/squad gen 1→2 # shift started
ssh: client connected: michael (SHA256:abc...) # remote connection
ssh: client connected: michael@10.0.0.42 (SHA256:abc...) # remote connection
inject: dev/squad-worker-g1-0 <- 42 bytes # executive injection
```

Expand Down
6 changes: 5 additions & 1 deletion internal/daemon/sshserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ func (s *SSHServer) handleConnection(conn net.Conn) {
if sshConn.Permissions != nil {
fp = sshConn.Permissions.Extensions["pubkey-fp"]
}
log.Printf("ssh: client connected: %s (%s)", sshConn.User(), fp)
host := conn.RemoteAddr().String()
if h, _, err := net.SplitHostPort(host); err == nil {
host = h
}
log.Printf("ssh: client connected: %s@%s (%s)", sshConn.User(), host, fp)

// Discard global requests (keepalive, etc.)
go ssh.DiscardRequests(reqs)
Expand Down
Loading