Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
Have seen this before to ssh/telnet commands


/Peo
----------------------------------------------------------
Per-Olof Olsson Email: ***@chalmers.se<mailto:***@chalmers.se>
Chalmers tekniska högskola IT-service
Arvid Hedvalls backe 6 412 96 Göteborg
Tel: 031/772 6738 Fax: 031/772 8680
----------------------------------------------------------


--_000_CF2299D189C1skyehuidahoedu_
Content-Type: text/html; charset="iso-8859-1"
Content-ID: <***@namprd04.prod.outlook.com>
Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "> <div>How about approaching this from a different direction? Instead of specifying the username and password on the command line, you specify an alternate cloginrc file, using the &#8211;f option? The alternate cloginrc file could have different user names and passwords.</div> <div><br> </div> <div>Skye.</div> <div><br> </div> <span id="OLK_SRC_BODY_SECTION"> <div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"> <span style="font-weight:bold">From: </span>Andrew Ohnstad &lt;<a href="mailto:***@gmail.com">***@gmail.com</a>&gt;<br> <span style="font-weight:bold">Date: </span>Thursday, February 13, 2014 9:19 AM<br> <span style="font-weight:bold">To: </span>&quot;<a href="mailto:rancid-***@shrubbery.net">rancid-***@shrubbery.net</a>&quot; &lt;<a href="mailto:rancid-***@shrubbery.net">rancid-***@shrubbery.net</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>Re: [rancid] Scripting clogin with bash and username/password<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div>I was hopeful about this, as it sounded good, but no luck.&nbsp; Adding the -- option didn't help, and even su'ing into an interactive shell for the rancid user and running the command without the sudo didn't help.<br>
<br>
</div>
Thanks for the suggestion, though!<br>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Feb 13, 2014 at 11:06 AM, Per-Olof Olsson <span dir="ltr">
&lt;<a href="mailto:***@chalmers.se" target="_blank">***@chalmers.se</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
heasley wrote 2014-02-13 16:40:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div class="h5">Thu, Feb 13, 2014 at 10:22:11AM -0500, Andrew Ohnstad:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for the response. &nbsp;The full command line I am using is (I<br>
automatically am enabled via TACACS&#43;):<br>
<br>
sudo -u rancid /usr/libexec/rancid/clogin -u&lt;my-username&gt; -p&lt;my-password&gt;<br>
-c where &lt;router&gt;<br>
<br>
If I add the -d argument to see the expect debugging, I can see that it<br>
launches the ssh spawn with the correct username, but it is blatantly<br>
disregarding the password supplied on the command line...<br>
<br>
spawn ssh -c 3des -x -l &lt;myusername&gt; &lt;router&gt;<br>
</blockquote>
<br>
this should work; what version of rancid?<br>
</div>
</div>
<div class="">______________________________<u></u>_________________<br>
Rancid-discuss mailing list<br>
<a href="mailto:Rancid-***@shrubbery.net" target="_blank">Rancid-***@shrubbery.net</a><br>
<a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/<u></u>mailman/listinfo/rancid-<u></u>discuss</a><br>
<br>
</div>
</blockquote>
<br>
sudo -l[l] [-AknS] [-g group name | #gid] [-p prompt] [-U user name] [-u user name | #uid] [command]<br>
is sudo using -p option for it's on to set a prompt? -u for own username...<br>
<br>
test<br>
&nbsp; &quot;sudo -u rancid -- /usr/libexec/rancid/clogin -u&lt;my-username&gt; -p&lt;my-password&gt; -c where &lt;router&gt;&quot;<br>
<br>
Loading...