Re: [rancid] backing up ubiquiti edgerouter

2018-07-20 Thread heasley
Fri, Jul 20, 2018 at 04:53:09PM +0100, Alex DEKKER:
> On 20/07/18 15:22, Craig Hopkins wrote:
> >
> >
> > That's only part of it, though. I still need the right .cloginrc 
> > commands. If I use ulogin, then:
> >
> > $ ulogin MYDEVICE
> > MYDEVICE
> > spawn ssh -x -l ubnt MYDEVICE
> > Welcome to EdgeOS
> >
> > By logging in, accessing, or using the Ubiquiti product, you
> > acknowledge that you have read and understood the Ubiquiti
> > License Agreement (available in the Web UI at, by default,
> > http://192.168.1.1) and agree to be bound by its terms.
> >
> > Linux MYDEVICE 3.10.107-UBNT #1 SMP Fri Jun 22 14:27:52 UTC 2018 mips64
> > Welcome to EdgeOS
> > Last login: Fri Jul 20 09:09:49 2018 from MY.IP.GOES.HERE
> > ubnt
> > ubnt@MYDEVICE:~$ ubnt
> > -vbash: ubnt: command not found
> > ubnt@MYDEVICE:~$
> >
> > Where is that extra "ubnt" coming from?
> 
> I expect the "Last login:" message is confusing ulogin and that's why it 
> sends the username again.

probably; thats new.  this ought to address that.

Index: bin/ulogin.in
===
--- bin/ulogin.in   (revision 3831)
+++ bin/ulogin.in   (working copy)
@@ -170,6 +170,12 @@
-nocase -re "^warning: remote host denied authentication agent 
forwarding." {
exp_continue;
}
+   -nocase -re "last login:" {
+   exp_continue
+   }
+   -nocase -re "failed login:" {   
+   exp_continue
+   }
eof { send_user "\nError: Couldn't login\n"; wait; return 1 }
-nocase "unknown host\r" {
catch {close}; catch {wait};

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


Re: [rancid] Username sent after login

2018-07-20 Thread Marles, Rob
Oh cool, willdo.  Thanks for the advice!

-Original Message-
From: heasley [mailto:h...@shrubbery.net]
Sent: Friday, July 20, 2018 10:32 AM
To: Marles, Rob 
Cc: Dan Anderson ; rancid-discuss@shrubbery.net
Subject: Re: [rancid] Username sent after login

Wed, Jul 18, 2018 at 06:18:44PM +, Marles, Rob:
> Thanks Dan
>
> I was asking because I had searched and kept seeing articles that were close, 
> but not quite the same.
>
> Your hint allowed me to find the post
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.shrubbery.net_
> pipermail_rancid-2Ddiscuss_2018-2DJune_010255.html=DwIDaQ=9mghv0de
> YPYDGP-W745IEdQLV1kHpn4XJRvR6xMRXtA=x9_zgdN80M-A0QNHMNDxOo4Peu_T3eQs
> LpxHIwFskhg=t5uEF5fQei1yZ-_2pkUkk2EMl-F40opf3rtoMFu-zls=WrERGv7IrK
> pJFZnKMtBBxkIkpg71fUNzOmjTEkn7U60=
>
>
> I issued a “no aaa authentication login-history” and things appear to log in 
> without passing the second username.
>
> Oddly, it still shows “missed cmd(s): show running-config view full, show 
> running-config”, “End of run not found”.  I guess it wasn’t related afterall.

grab the current alpha rancid tarball, that fixes this.  That will become 
rancid 3.8 at some point today.
Please be advised that this email may contain confidential information. If you 
are not the intended recipient, please notify us by email by replying to the 
sender and delete this message. The sender disclaims that the content of this 
email constitutes an offer to enter into, or the acceptance of, any agreement; 
provided that the foregoing does not invalidate the binding effect of any 
digital or other electronic reproduction of a manual signature that is included 
in any attachment.
___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Username sent after login

2018-07-20 Thread heasley
Wed, Jul 18, 2018 at 06:18:44PM +, Marles, Rob:
> Thanks Dan
> 
> I was asking because I had searched and kept seeing articles that were close, 
> but not quite the same.
> 
> Your hint allowed me to find the post 
> http://www.shrubbery.net/pipermail/rancid-discuss/2018-June/010255.html
> 
> 
> I issued a “no aaa authentication login-history” and things appear to log in 
> without passing the second username.
> 
> Oddly, it still shows “missed cmd(s): show running-config view full, show 
> running-config”, “End of run not found”.  I guess it wasn’t related afterall.

grab the current alpha rancid tarball, that fixes this.  That will become
rancid 3.8 at some point today.

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


Re: [rancid] backing up ubiquiti edgerouter

2018-07-20 Thread heasley
Fri, Jul 20, 2018 at 10:19:38AM +0100, Craig Hopkins:
> Hi all,
> 
> Does anybody know the syntax for cloginrc and router.db for edgerouters?
> 
> I've tried various permutations and either:
> - it won't log in because there isn't an enable password
> - if I set autoenable to 1, it will log in but fail to back up:
> 
> $ clogin -t edgerouter MYDEVICE

ulogin

> MYDEVICE
> spawn ssh -x -l ubnt MYDEVICE
> Welcome to EdgeOS
> 
> By logging in, accessing, or using the Ubiquiti product, you
> acknowledge that you have read and understood the Ubiquiti
> License Agreement (available in the Web UI at, by default,
> http://192.168.1.1) and agree to be bound by its terms.
> 
> Linux MYDEVICE 3.10.107-UBNT #1 SMP Mon Mar 5 18:18:48 UTC 2018 mips64
> Welcome to EdgeOS
> Last login: Tue Apr 28 05:41:57 2015 from 2a00:my:ip:went::here
> 
> Error: TIMEOUT reached

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

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


[rancid] backing up ubiquiti edgerouter

2018-07-20 Thread Craig Hopkins
Hi all,

Does anybody know the syntax for cloginrc and router.db for edgerouters?

I've tried various permutations and either:
- it won't log in because there isn't an enable password
- if I set autoenable to 1, it will log in but fail to back up:

$ clogin -t edgerouter MYDEVICE
MYDEVICE
spawn ssh -x -l ubnt MYDEVICE
Welcome to EdgeOS

By logging in, accessing, or using the Ubiquiti product, you
acknowledge that you have read and understood the Ubiquiti
License Agreement (available in the Web UI at, by default,
http://192.168.1.1) and agree to be bound by its terms.

Linux MYDEVICE 3.10.107-UBNT #1 SMP Mon Mar 5 18:18:48 UTC 2018 mips64
Welcome to EdgeOS
Last login: Tue Apr 28 05:41:57 2015 from 2a00:my:ip:went::here

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