[rancid] .cloginrc add method hostname {ssh:-port} for mtlogin/mtrancid?
heasley
heas at shrubbery.net
Wed Jun 3 15:08:09 UTC 2015
Wed, Jun 03, 2015 at 03:07:39PM +0100, Lukasz Sokol:
> rancid at george:~$ bin/mtlogin hostname
> hostname
>
> Error: unknown connection method: ssh:65122
>
> will get there, eventually :)
grumble. it needs to match the port below; i think this change is the
missing bit. sorry
Index: bin/mtlogin.in
===================================================================
--- bin/mtlogin.in (revision 3124)
+++ bin/mtlogin.in (working copy)
@@ -277,7 +277,7 @@
send_user "\nError: telnet failed: $reason\n"
return 1
}
- } elseif ![string compare $prog "ssh"] {
+ } elseif [string match "ssh*" $prog] {
# ssh to the router & try to login with or without an identfile.
regexp {ssh(:([^[:space:]]+))*} $prog methcmd suffix port
set cmd $sshcmd
More information about the Rancid-discuss
mailing list