<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBScript: Работа с SSH]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=7309&amp;type=atom" />
	<updated>2012-07-01T02:28:42Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=7309</id>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61314#p61314" />
			<content type="html"><![CDATA[<p>спасибо!</p>]]></content>
			<author>
				<name><![CDATA[Vetal142]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28225</uri>
			</author>
			<updated>2012-07-01T02:28:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61314#p61314</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61313#p61313" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>set sFileName=1.txt

(
    echo.    
    echo.copy running-config tftp 10.77.2.90 %sFileName%
    echo.exit
    echo.exit
    echo.y
) &gt;a.txt

rem Здесь код

del a.txt</code></pre></div>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-07-01T00:34:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61313#p61313</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61307#p61307" />
			<content type="html"><![CDATA[<p>сильно б помогло б если еще скрипт кинули.</p>]]></content>
			<author>
				<name><![CDATA[Vetal142]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28225</uri>
			</author>
			<updated>2012-06-30T17:01:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61307#p61307</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61302#p61302" />
			<content type="html"><![CDATA[<p><strong>Vetal142</strong>, создавайте файл «a.txt» непосредственно из пакетного файла, после использования — оттуда же удаляйте.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-06-30T15:34:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61302#p61302</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61301#p61301" />
			<content type="html"><![CDATA[<p>нашел вот такой выход с положения, указав файл ответов в коде, но необходимо сохранять каждый когфиг отдельно, можно ли параметр 1.txt заманить на переменную, так что б конфиг каждого коммутатора отличался.<br /></p><div class="codebox"><pre><code>echo on
set baseip=10.77.3
set user=admin
set pass=123456
for /l %%i in (207,1,208) do (
plink.exe -ssh -batch %baseip%.%%i -l %user% -pw %pass% &lt;a.txt &gt;log.txt
)</code></pre></div><p>Тест файла a.txt такой:<br /></p><div class="codebox"><pre><code>    - пробелы, т.к войдя в сессию необходимо нажать любую клавишу  
copy running-config tftp 10.77.2.90 1.txt
exit
exit
y</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Vetal142]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28225</uri>
			</author>
			<updated>2012-06-30T14:41:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61301#p61301</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61298#p61298" />
			<content type="html"><![CDATA[<p><span style="color: Green">Коллеги, напоминаю, что код оформляется <a href="http://forum.script-coding.com/help.php#bbcode">тэгом «code»</a>.</span></p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-06-30T09:56:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61298#p61298</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61297#p61297" />
			<content type="html"><![CDATA[<p>к сожалению, функция бекапа не реализована через web интерфейс.</p><p>Пытаюсь допилить ваш скрипт с толкнулся с такими трудностями:<br />при подключении к коммутатору необходимо послать команду нажатия любой клавиши в этой сессии, а после уже отправлять команду BackUP-а</p><p>Подскажите как это сделать?</p><div class="codebox"><pre><code>echo on
set baseip=10.77.3
set user=admin
set pass=123456
for /l %%i in (207,1,215) do (
plink.exe -ssh -batch %baseip%.%%i -l user% -pw %pass% &quot;copy running-config tftp 10.77.2.90 1.txt&quot;)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Vetal142]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28225</uri>
			</author>
			<updated>2012-06-30T09:07:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61297#p61297</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61285#p61285" />
			<content type="html"><![CDATA[<p>Попробуй подойти к проблеме со стороны браузера, направление действий:</p><div class="codebox"><pre><code>     var oIE=WScript.CreateObject(&#039;InternetExplorer.Application&#039;, &quot;ie_&quot;);
     oIE.navigate(&quot;твой IP&quot;);  // можно циклом
     oIE.visible=0;                 // Если не хочешь смотреть на открытое окно
     while(oIE.Busy) WScript.Sleep(200);
     var ob=oIE.Document.Script;
              здесь надо ввести параметры Логина и пароля, организовать переход по ссылке на страницу BackUP (по сути работа в среде браузера, только скриптом)
     oIE.Quit();</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Fedor]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28233</uri>
			</author>
			<updated>2012-06-29T19:10:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61285#p61285</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61283#p61283" />
			<content type="html"><![CDATA[<p>Но все же возможно подобный функционал реализовать через VBA?</p>]]></content>
			<author>
				<name><![CDATA[Vetal142]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28225</uri>
			</author>
			<updated>2012-06-29T13:33:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61283#p61283</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61282#p61282" />
			<content type="html"><![CDATA[<p>комментарий не нужен, спасибо!</p>]]></content>
			<author>
				<name><![CDATA[Vetal142]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28225</uri>
			</author>
			<updated>2012-06-29T12:32:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61282#p61282</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61281#p61281" />
			<content type="html"><![CDATA[<p>Прокомментируйте пожалуйста код:</p><p>for /l %%x in (1,207,215) do (<br />&nbsp; &nbsp; plink -pw %pass% %user%:%baseip%.%%x &quot;copy running-config tftp 10.77.2.90 test.txt&quot;<br />)</p>]]></content>
			<author>
				<name><![CDATA[Vetal142]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28225</uri>
			</author>
			<updated>2012-06-29T11:42:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61281#p61281</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61271#p61271" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>echo off
set baseip=10.77.3
set user=Вася
set pass=Пупкин
for /l %%x in (1,207,215) do (
    plink -pw %pass% %user%:%baseip%.%%x &quot;copy running-config tftp 10.77.2.90 test.txt&quot;
)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[smaharbA]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2911</uri>
			</author>
			<updated>2012-06-29T08:33:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61271#p61271</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61270#p61270" />
			<content type="html"><![CDATA[<p>Нет, к сожалению такой функционал на них не реализован.<br />это вариант, но для каждого коммутатора придется вводить вручную, а хотелось бы настроить цикл, в котором будут перебираться ip адреса.<br />еще почему хотелось бы реализовать на vbs или vba т.к в дальнейшем поняв как обращаться к коммутаторам дописать отображение настроек портов а едином excel файле.</p>]]></content>
			<author>
				<name><![CDATA[Vetal142]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28225</uri>
			</author>
			<updated>2012-06-29T08:17:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61270#p61270</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61269#p61269" />
			<content type="html"><![CDATA[<p>&quot;backUp коммутаторов HP через tftp сервер&quot; - а коммутаторы сами не умеют ?</p><p>а так plink -pw pass user:host &quot;copy running-config tftp 10.77.2.90 test.txt&quot;</p>]]></content>
			<author>
				<name><![CDATA[smaharbA]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2911</uri>
			</author>
			<updated>2012-06-29T06:39:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61269#p61269</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Работа с SSH]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61267#p61267" />
			<content type="html"><![CDATA[<p>подключение к коммутаторам осуществляется по ssh.</p>]]></content>
			<author>
				<name><![CDATA[Vetal142]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28225</uri>
			</author>
			<updated>2012-06-29T05:44:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61267#p61267</id>
		</entry>
</feed>
