<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Script SSH Connection to Procurve Switches in Switches, Hubs, and Modems</title>
    <link>https://community.hpe.com/t5/switches-hubs-and-modems/script-ssh-connection-to-procurve-switches/m-p/4702367#M24189</link>
    <description>Hi EckerA,&lt;BR /&gt;&lt;BR /&gt;I've been looking into ttmacro/tera term. Looks pretty good. Would it be possible for you to post of one of your scripts? I seem to be having some problems getting mine to connect correctly.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;&lt;BR /&gt;Tim Stella</description>
    <pubDate>Thu, 21 Oct 2010 15:11:14 GMT</pubDate>
    <dc:creator>tstella</dc:creator>
    <dc:date>2010-10-21T15:11:14Z</dc:date>
    <item>
      <title>Script SSH Connection to Procurve Switches</title>
      <link>https://community.hpe.com/t5/switches-hubs-and-modems/script-ssh-connection-to-procurve-switches/m-p/4702364#M24186</link>
      <description>I'm having some trouble writing a Perl script to ssh into a procurve switch. It does have SSH enabled and I am able to manually connect via SSH. Here is the script, and the debug output:&lt;BR /&gt;&lt;BR /&gt;---------------------------&lt;BR /&gt;Script&lt;BR /&gt;---------------------------&lt;BR /&gt;&lt;BR /&gt;#!/bin/perl&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;use Net::SSH::Perl;&lt;BR /&gt;&lt;BR /&gt;$host = "IP";&lt;BR /&gt;my $ssh = Net::SSH::Perl-&amp;gt;new($host, protocol =&amp;gt; 2, debug =&amp;gt; 1, use_pty =&amp;gt; 1);&lt;BR /&gt;$ssh-&amp;gt;login("admin","passwordomitted");&lt;BR /&gt;$ssh-&amp;gt;sock-&amp;gt;print("\n");&lt;BR /&gt;sleep(2);&lt;BR /&gt;my ($stdout, $stderr) = $ssh-&amp;gt;cmd("sh ver\n");&lt;BR /&gt;print "Output: $out\n";&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-----------------------------&lt;BR /&gt;Debug Output&lt;BR /&gt;-----------------------------&lt;BR /&gt;debian: Reading configuration data /home/timothy/.ssh/config&lt;BR /&gt;debian: Reading configuration data /etc/ssh_config&lt;BR /&gt;debian: Connecting to ip, port 22.&lt;BR /&gt;debian: Remote protocol version 1.99, remote software version OpenSSH_3.4p1&lt;BR /&gt;debian: Net::SSH::Perl Version 1.34, protocol version 2.0.&lt;BR /&gt;debian: No compat match: OpenSSH_3.4p1.&lt;BR /&gt;debian: Connection established.&lt;BR /&gt;debian: Sent key-exchange init (KEXINIT), wait response.&lt;BR /&gt;debian: Algorithms, c-&amp;gt;s: 3des-cbc hmac-sha1 none&lt;BR /&gt;debian: Algorithms, s-&amp;gt;c: 3des-cbc hmac-sha1 none&lt;BR /&gt;debian: Entering Diffie-Hellman Group 1 key exchange.&lt;BR /&gt;debian: Sent DH public key, waiting for reply.&lt;BR /&gt;debian: Received host key, type 'ssh-rsa'.&lt;BR /&gt;debian: Host 'ip' is known and matches the host key.&lt;BR /&gt;debian: Computing shared secret key.&lt;BR /&gt;debian: Verifying server signature.&lt;BR /&gt;debian: Waiting for NEWKEYS message.&lt;BR /&gt;debian: Send NEWKEYS.&lt;BR /&gt;debian: Enabling encryption/MAC/compression.&lt;BR /&gt;debian: Sending request for user-authentication service.&lt;BR /&gt;debian: Service accepted: ssh-userauth.&lt;BR /&gt;debian: Trying empty user-authentication request.&lt;BR /&gt;debian: Authentication methods that can continue: password.&lt;BR /&gt;debian: Next method to try is password.&lt;BR /&gt;debian: Trying password authentication.&lt;BR /&gt;debian: Login completed, opening dummy shell channel.&lt;BR /&gt;debian: channel 0: new [client-session]&lt;BR /&gt;debian: Requesting channel_open for channel 0.&lt;BR /&gt;debian: channel 0: open confirm rwindow 0 rmax 32768&lt;BR /&gt;debian: Got channel open confirmation, requesting shell.&lt;BR /&gt;debian: Requesting service shell on channel 0.&lt;BR /&gt;debian: channel 1: new [client-session]&lt;BR /&gt;debian: Requesting channel_open for channel 1.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I am also open to writing the script in another language, as long as it will work.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Tim Stella</description>
      <pubDate>Wed, 20 Oct 2010 18:24:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/switches-hubs-and-modems/script-ssh-connection-to-procurve-switches/m-p/4702364#M24186</guid>
      <dc:creator>tstella</dc:creator>
      <dc:date>2010-10-20T18:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Script SSH Connection to Procurve Switches</title>
      <link>https://community.hpe.com/t5/switches-hubs-and-modems/script-ssh-connection-to-procurve-switches/m-p/4702365#M24187</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;That's about as far as I got using Net::SSH on a Windows host. There was no way of getting the session to complete and I couldn't find anyone else that had managed it.&lt;BR /&gt;Even passing commands directly using plink fails to work.&lt;BR /&gt;A colleague had it working using a horrible method of auto-pasting commands into an open putty window.&lt;BR /&gt;In the end I decided all we needed from the scripts was a copy of the configs so I use SCP to pull that down and we use PCM+ for anything that requires us to send batches of commands.</description>
      <pubDate>Thu, 21 Oct 2010 08:46:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/switches-hubs-and-modems/script-ssh-connection-to-procurve-switches/m-p/4702365#M24187</guid>
      <dc:creator>Mohammed Faiz</dc:creator>
      <dc:date>2010-10-21T08:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Script SSH Connection to Procurve Switches</title>
      <link>https://community.hpe.com/t5/switches-hubs-and-modems/script-ssh-connection-to-procurve-switches/m-p/4702366#M24188</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;i always use teraterm and ttmacro for scripts.&lt;BR /&gt;works like a charm..&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;alex</description>
      <pubDate>Thu, 21 Oct 2010 08:50:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/switches-hubs-and-modems/script-ssh-connection-to-procurve-switches/m-p/4702366#M24188</guid>
      <dc:creator>EckerA</dc:creator>
      <dc:date>2010-10-21T08:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Script SSH Connection to Procurve Switches</title>
      <link>https://community.hpe.com/t5/switches-hubs-and-modems/script-ssh-connection-to-procurve-switches/m-p/4702367#M24189</link>
      <description>Hi EckerA,&lt;BR /&gt;&lt;BR /&gt;I've been looking into ttmacro/tera term. Looks pretty good. Would it be possible for you to post of one of your scripts? I seem to be having some problems getting mine to connect correctly.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;&lt;BR /&gt;Tim Stella</description>
      <pubDate>Thu, 21 Oct 2010 15:11:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/switches-hubs-and-modems/script-ssh-connection-to-procurve-switches/m-p/4702367#M24189</guid>
      <dc:creator>tstella</dc:creator>
      <dc:date>2010-10-21T15:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Script SSH Connection to Procurve Switches</title>
      <link>https://community.hpe.com/t5/switches-hubs-and-modems/script-ssh-connection-to-procurve-switches/m-p/4702368#M24190</link>
      <description>Sure,&lt;BR /&gt;&lt;BR /&gt;here is a place for a lot of informations and scripts for tterm and ttmacro:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://logmett.com/forum/index.php" target="_blank"&gt;http://logmett.com/forum/index.php&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;there u can as well find a script to connect via ssh.&lt;BR /&gt;&lt;BR /&gt;for example:&lt;BR /&gt;&lt;BR /&gt;connect 'xxxx.xxx.xxx.xx:22 /ssh /auth=password /user=net/passwd=xxxxx'&lt;BR /&gt;&lt;BR /&gt;ShowRun = 'show run'&lt;BR /&gt;&lt;BR /&gt;mpause 3000&lt;BR /&gt;&lt;BR /&gt;sendln ShowRun#&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;alex&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Oct 2010 04:03:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/switches-hubs-and-modems/script-ssh-connection-to-procurve-switches/m-p/4702368#M24190</guid>
      <dc:creator>EckerA</dc:creator>
      <dc:date>2010-10-22T04:03:55Z</dc:date>
    </item>
  </channel>
</rss>

