diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index 143a8d2e4..5a646c57f 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -472,6 +472,7 @@ func (b *LocalBackend) populatePeerStatusLocked(sb *ipnstate.StatusBuilder) { ShareeNode: p.Hostinfo.ShareeNode(), ExitNode: p.StableID != "" && p.StableID == b.prefs.ExitNodeID, ExitNodeOption: exitNodeOption, + SSH_HostKeys: p.Hostinfo.SSH_HostKeys().AsSlice(), }) } } diff --git a/ipn/ipnstate/ipnstate.go b/ipn/ipnstate/ipnstate.go index 9c103d379..fee2ed924 100644 --- a/ipn/ipnstate/ipnstate.go +++ b/ipn/ipnstate/ipnstate.go @@ -145,6 +145,9 @@ type PeerStatus struct { PeerAPIURL []string Capabilities []string `json:",omitempty"` + // SSH_HostKeys are the node's SSH host keys, if known. + SSH_HostKeys []string `json:"sshHostKeys,omitempty"` + // ShareeNode indicates this node exists in the netmap because // it's owned by a shared-to user and that node might connect // to us. These nodes should be hidden by "tailscale status" @@ -284,6 +287,9 @@ func (sb *StatusBuilder) AddPeer(peer key.NodePublic, st *PeerStatus) { if v := st.OS; v != "" { e.OS = st.OS } + if v := st.SSH_HostKeys; v != nil { + e.SSH_HostKeys = v + } if v := st.Addrs; v != nil { e.Addrs = v }