@@ -17,15 +17,15 @@ type list struct {
1717}
1818
1919type displayItem struct {
20- sc ssh.Conn
20+ sc ssh.ServerConn
2121 id string
2222}
2323
2424func fancyTable (tty io.ReadWriter , applicable []displayItem ) {
2525
26- t , _ := table .NewTable ("Targets" , "ID" , "Hostname" , "IP Address" , "Version" )
26+ t , _ := table .NewTable ("Targets" , "ID" , "Public Key Hash" , " Hostname" , "IP Address" , "Version" )
2727 for _ , a := range applicable {
28- t .AddValues (a .id , clients .NormaliseHostname (a .sc .User ()), a .sc .RemoteAddr ().String (), string (a .sc .ClientVersion ()))
28+ t .AddValues (a .id , a . sc . Permissions . Extensions [ "pubkey-fp" ], clients .NormaliseHostname (a .sc .User ()), a .sc .RemoteAddr ().String (), string (a .sc .ClientVersion ()))
2929 }
3030
3131 t .Fprint (tty )
@@ -71,7 +71,7 @@ func (l *list) Run(tty io.ReadWriter, line terminal.ParsedLine) error {
7171 sort .Strings (ids )
7272
7373 for _ , id := range ids {
74- toReturn = append (toReturn , displayItem {id : id , sc : matchingClients [id ]})
74+ toReturn = append (toReturn , displayItem {id : id , sc : * matchingClients [id ]})
7575 }
7676
7777 if line .IsSet ("t" ) {
@@ -83,7 +83,7 @@ func (l *list) Run(tty io.ReadWriter, line terminal.ParsedLine) error {
8383
8484 for i , tr := range toReturn {
8585
86- fmt .Fprintf (tty , "%s %s %s, version: %s" , tr .id , clients .NormaliseHostname (tr .sc .User ()), tr .sc .RemoteAddr ().String (), tr .sc .ClientVersion ())
86+ fmt .Fprintf (tty , "%s %s %s %s , version: %s" , tr .id , tr . sc . Permissions . Extensions [ "pubkey-fp" ] , clients .NormaliseHostname (tr .sc .User ()), tr .sc .RemoteAddr ().String (), tr .sc .ClientVersion ())
8787
8888 if i != len (toReturn )- 1 {
8989 fmt .Fprint (tty , sep )
@@ -109,7 +109,7 @@ func (l *list) Help(explain bool) string {
109109
110110 return terminal .MakeHelpText (
111111 "ls [OPTION] [FILTER]" ,
112- "Filter uses glob matching against all attributes of a target (hostname, ip, id )" ,
112+ "Filter uses glob matching against all attributes of a target (id, public key hash, hostname, ip )" ,
113113 "\t -t\t Print all attributes in pretty table" ,
114114 "\t -h\t Print help" ,
115115 )
0 commit comments