Re: [rancid] Logging in with ssh keys vs username passwords

2017-12-05 Thread heasley
Tue, Dec 05, 2017 at 10:50:54PM +, Remsik,Robert:
> Hello!
> 
> 
> I've got a couple network devices that support either username/password OR 
> sshkeys, but not both, for management access.  Is there a way to have rancid 
> use an ssh key in the .clogit file or another way to
> 
> 
> I'm trying to setup sshing into network devices via ssh keys (bypassing 
> username/passwords) and I'm not coming up with anything.  Is this possible?
> 

yes, see cloginrc(5).

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] DELL PowerConnect 70xx Watts Status

2017-12-05 Thread heasley
Mon, Dec 04, 2017 at 01:52:20PM -0500, Gerhard Mourani:
> Hello,
> 
> Sorry for the delay, here the output, thanks.
> 
> EliteStack7024#show system
> 
> System Description: Dell Ethernet Switch
> System Up Time: 60 days, 06h:26m:08s
> System Contact: x...@xxx.xx
> System Name: EliteStack7024
> System Location: 
> Burned In MAC Address: ..
> System Object ID: 1.3.6.1.4.1.674.10895.3035
> System Model ID: PCT7048
> Machine Type: PowerConnect 7048
> Temperature Sensors:
> 
> Unit Description   TemperatureStatus
> (Celsius)
>  ---   -----
> 1MAC   31 Good
> 1PHY   29 Good
> 2MAC   30 Good
> 2PHY   28 Good
> 3MAC   32 Good
> 3PHY   26 Good
> 
> Fans:
> --More-- or (q)uit
> 
> Unit DescriptionStatus
>  -----
>  1   Fan 1  OK
>  1   Fan 2  OK
>  1   Fan 3  OK
>  2   Fan 1  OK
>  2   Fan 2  OK
>  2   Fan 3  OK
>  3   Fan 1  OK
>  3   Fan 2  OK
>  3   Fan 3  OK
> 
> Power Supplies:
> 
> Unit  DescriptionStatus Average Current  Since
>  Power   Power Date/Time
> (Watts) (Watts)
>   ---  ---  --    ---
> 1 System   OK1.465.2
> 1 Internal OK   N/A N/A   10/05/2017 20:18:35
> 1 RedundantNo Power
> 2 System   OK0.267.0
> --More-- or (q)uit
> 2 Internal OK   N/A N/A   10/05/2017 20:18:35
> 2 RedundantNo Power
> 3 System   OK0.770.6
> 3 Internal OK   N/A N/A   10/05/2017 20:18:23
> 3 RedundantNo Power
> 
> USB Port Power Status:
> --
> Device Not Present

Does this patch work properly in production?

Index: bin/srancid.in
===
--- bin/srancid.in  (revision 3734)
+++ bin/srancid.in  (working copy)
@@ -151,6 +151,35 @@
}
}
 
+   # filter power rates and tmestamps from 7024 power supply info
+   # Power Supplies:
+   #  
+   # Unit  DescriptionStatus Average Current  Since
+   #  Power   Power Date/Time
+   # (Watts) (Watts)
+   #   ---  ---  --    
---
+   # 1 System   OK1.465.2
+   # 1 Internal OK   N/A N/A   10/05/2017 
20:18:35
+   if (/power supplies/i) {
+   ProcessHistory("COMMENTS","keysort","C1",
+   "! Unit\tDescription\tStatus\n");
+   ProcessHistory("COMMENTS","keysort","C1",
+   "! \t---\t--\n");
+   while () {
+   s/^\s+\015//g;
+   tr/\015//d;
+   /^(unit\s|--+\s|\s)/i && next;
+   if (/(\d+)\s+(\w+)\s+(\w+(\s\w+)?)\s/) {
+   if (length($2) >= 8) {
+   ProcessHistory("COMMENTS","keysort","C1","! 
$1\t$2\t$3\n");
+   } else {
+   ProcessHistory("COMMENTS","keysort","C1","! 
$1\t$2\t\t$3\n");
+   }
+   }
+   /^\s*$/ && last;
+   }
+   }
+
/system description: (.*)/i &&
ProcessHistory("COMMENTS","keysort","A1", "!Chassis type: $1\n") &&
next;

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss