[rancid] .cloginrc add method hostname {ssh:-port} for mtlogin/mtrancid?

Lukasz Sokol el.es.cr at gmail.com
Wed Jun 3 15:42:09 UTC 2015


On 03/06/15 16:08, heasley wrote:
> 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
> 
> 
I found the relevant line next to the previous backport,
but this change causes all ssh contacts to fail even the 'up' test.

what is wrong with compare ?

lukasz


More information about the Rancid-discuss mailing list