<?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: Impossible to get output of remote ssh commands via cron in ExtremeSwitching (EXOS/Switch Engine)</title>
    <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56932#M16751</link>
    <description>Hello Bart,&lt;BR /&gt;
&lt;BR /&gt;
which version of EXOS do you use? In my testing older firmware versions did not work, while newer did.&lt;BR /&gt;
&lt;BR /&gt;
Did you try to run your script with /dev/null as STDIN from a terminal window? That resulted in the same problem as running the command from cron for me.&lt;BR /&gt;
$ my_script HTH,&lt;BR /&gt;
Erik</description>
    <pubDate>Sat, 09 Jul 2016 20:08:00 GMT</pubDate>
    <dc:creator>Erik_Auerswald</dc:creator>
    <dc:date>2016-07-09T20:08:00Z</dc:date>
    <item>
      <title>Impossible to get output of remote ssh commands via cron</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56924#M16743</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I have made a bash script to get ipstats of several devices, and i have a problem with my X450a-48t, the script works fine if i execute it manually, but in crontab no output, i think because in cron no tty is allocated.&lt;BR /&gt;
&lt;BR /&gt;
Example script:&lt;BR /&gt;
&lt;BR /&gt;
#!/bin/bash&lt;BR /&gt;
&lt;BR /&gt;
ssh -o "StrictHostKeyChecking no" admin@10.26.196.189 "show ipstats"&lt;BR /&gt;
&lt;BR /&gt;
i have checked ssh with -t and -tt option, but doesn't work.&lt;BR /&gt;
&lt;BR /&gt;
¿Any idea how to solve it? ¿another possibility to get this stats remotely?&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
&lt;BR /&gt;
Ivan&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 13 May 2016 18:08:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56924#M16743</guid>
      <dc:creator>Iván_García_Díe</dc:creator>
      <dc:date>2016-05-13T18:08:00Z</dc:date>
    </item>
    <item>
      <title>RE: Impossible to get output of remote ssh commands via cron</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56925#M16744</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
the script started by cron probably has no SSH agent available. You could try to specify the identity (key) file to use with the option -i.&lt;BR /&gt;
ssh -i /path/to/key_file -o "StrictHostKeyChecking no" &lt;A href="https://mailto:admin@10.26.196.189" target="_blank" rel="nofollow noreferrer noopener"&gt;admin@10.26.196.189&lt;/A&gt; "show ipstats"Regards,&lt;BR /&gt;
Erik&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 13 May 2016 19:55:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56925#M16744</guid>
      <dc:creator>Erik_Auerswald</dc:creator>
      <dc:date>2016-05-13T19:55:00Z</dc:date>
    </item>
    <item>
      <title>RE: Impossible to get output of remote ssh commands via cron</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56926#M16745</link>
      <description>Hi Erik,&lt;BR /&gt;
&lt;BR /&gt;
No difference with -i option. There is no problem with authentication. I share debug output, you can see "Authentication succeeded". The problem i think is this line "debug2: channel 0: read failed"&lt;BR /&gt;
&lt;BR /&gt;
OpenSSH_5.1p1, OpenSSL 0.9.8j-fips 07 Jan 2009&lt;BR /&gt;
debug1: Reading configuration data /etc/ssh/ssh_config&lt;BR /&gt;
debug1: Applying options for *&lt;BR /&gt;
debug1: Applying options for *&lt;BR /&gt;
debug2: ssh_connect: needpriv 0&lt;BR /&gt;
debug1: Connecting to 10.26.196.189 [10.26.196.189] port 22.&lt;BR /&gt;
debug1: Connection established.&lt;BR /&gt;
debug1: permanently_set_uid: 0/0&lt;BR /&gt;
debug2: key_type_from_name: unknown key type '-----BEGIN'&lt;BR /&gt;
debug2: key_type_from_name: unknown key type '-----END'&lt;BR /&gt;
debug1: identity file /root/.ssh/id_rsa type 1&lt;BR /&gt;
debug2: key_type_from_name: unknown key type '-----BEGIN'&lt;BR /&gt;
debug2: key_type_from_name: unknown key type '-----END'&lt;BR /&gt;
debug1: identity file /root/.ssh/id_dsa type 2&lt;BR /&gt;
debug1: Remote protocol version 2.0, remote software version 4.1.2 SSH Secure Shell Toolkit&lt;BR /&gt;
debug1: no match: 4.1.2 SSH Secure Shell Toolkit&lt;BR /&gt;
debug1: Enabling compatibility mode for protocol 2.0&lt;BR /&gt;
debug1: Local version string SSH-2.0-OpenSSH_5.1&lt;BR /&gt;
debug2: fd 3 setting O_NONBLOCK&lt;BR /&gt;
debug1: SSH2_MSG_KEXINIT sent&lt;BR /&gt;
debug1: SSH2_MSG_KEXINIT received&lt;BR /&gt;
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1&lt;BR /&gt;
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss&lt;BR /&gt;
debug2: kex_parse_kexinit: aes128-ctr,aes256-ctr,arcfour256,arcfour,aes128-cbc,aes256-cbc&lt;BR /&gt;
debug2: kex_parse_kexinit: aes128-ctr,aes256-ctr,arcfour256,arcfour,aes128-cbc,aes256-cbc&lt;BR /&gt;
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96&lt;BR /&gt;
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96&lt;BR /&gt;
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib&lt;BR /&gt;
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib&lt;BR /&gt;
debug2: kex_parse_kexinit:&lt;BR /&gt;
debug2: kex_parse_kexinit:&lt;BR /&gt;
debug2: kex_parse_kexinit: first_kex_follows 0&lt;BR /&gt;
debug2: kex_parse_kexinit: reserved 0&lt;BR /&gt;
debug2: kex_parse_kexinit: diffie-hellman-group1-sha1&lt;BR /&gt;
debug2: kex_parse_kexinit: ssh-dss&lt;BR /&gt;
debug2: kex_parse_kexinit: aes256-cbc,aes192-cbc,aes128-cbc,twofish256-cbc,twofish-cbc,twofish192-cbc,twofish128-cbc,blowfish-cbc,3des-cbc&lt;BR /&gt;
debug2: kex_parse_kexinit: aes256-cbc,aes192-cbc,aes128-cbc,twofish256-cbc,twofish-cbc,twofish192-cbc,twofish128-cbc,blowfish-cbc,3des-cbc&lt;BR /&gt;
debug2: kex_parse_kexinit: hmac-sha1,hmac-md5,hmac-sha1-96,hmac-md5-96&lt;BR /&gt;
debug2: kex_parse_kexinit: hmac-sha1,hmac-md5,hmac-sha1-96,hmac-md5-96&lt;BR /&gt;
debug2: kex_parse_kexinit: none&lt;BR /&gt;
debug2: kex_parse_kexinit: none&lt;BR /&gt;
debug2: kex_parse_kexinit:&lt;BR /&gt;
debug2: kex_parse_kexinit:&lt;BR /&gt;
debug2: kex_parse_kexinit: first_kex_follows 0&lt;BR /&gt;
debug2: kex_parse_kexinit: reserved 0&lt;BR /&gt;
debug2: mac_setup: found hmac-md5&lt;BR /&gt;
debug1: kex: server-&amp;gt;client aes128-cbc hmac-md5 none&lt;BR /&gt;
debug2: mac_setup: found hmac-md5&lt;BR /&gt;
debug1: kex: client-&amp;gt;server aes128-cbc hmac-md5 none&lt;BR /&gt;
debug2: dh_gen_key: priv key bits set: 123/256&lt;BR /&gt;
debug2: bits set: 494/1024&lt;BR /&gt;
debug1: sending SSH2_MSG_KEXDH_INIT&lt;BR /&gt;
debug1: expecting SSH2_MSG_KEXDH_REPLY&lt;BR /&gt;
debug1: Host '10.26.196.189' is known and matches the DSA host key.&lt;BR /&gt;
debug1: Found key in /root/.ssh/known_hosts:4&lt;BR /&gt;
debug2: bits set: 525/1024&lt;BR /&gt;
debug1: ssh_dss_verify: signature correct&lt;BR /&gt;
debug2: kex_derive_keys&lt;BR /&gt;
debug2: set_newkeys: mode 1&lt;BR /&gt;
debug1: SSH2_MSG_NEWKEYS sent&lt;BR /&gt;
debug1: expecting SSH2_MSG_NEWKEYS&lt;BR /&gt;
debug2: set_newkeys: mode 0&lt;BR /&gt;
debug1: SSH2_MSG_NEWKEYS received&lt;BR /&gt;
debug1: SSH2_MSG_SERVICE_REQUEST sent&lt;BR /&gt;
debug2: service_accept: ssh-userauth&lt;BR /&gt;
debug1: SSH2_MSG_SERVICE_ACCEPT received&lt;BR /&gt;
debug2: key: /root/.ssh/id_rsa (0x7f2e3b150be0)&lt;BR /&gt;
debug2: key: /root/.ssh/id_dsa (0x7f2e3b150b30)&lt;BR /&gt;
debug1: Authentications that can continue: publickey,keyboard-interactive,password&lt;BR /&gt;
debug1: Next authentication method: publickey&lt;BR /&gt;
debug1: Offering public key: /root/.ssh/id_rsa&lt;BR /&gt;
debug2: we sent a publickey packet, wait for reply&lt;BR /&gt;
debug1: Server accepts key: pkalg ssh-rsa blen 277&lt;BR /&gt;
debug2: input_userauth_pk_ok: fp 2a:f5:57:63:32:81:62:57:31:e9:de:46:7e:49:eb:ca&lt;BR /&gt;
debug1: read PEM private key done: type RSA&lt;BR /&gt;
debug1: Authentication succeeded (publickey).&lt;BR /&gt;
debug2: fd 4 setting O_NONBLOCK&lt;BR /&gt;
debug2: fd 5 setting O_NONBLOCK&lt;BR /&gt;
debug2: fd 6 setting O_NONBLOCK&lt;BR /&gt;
debug1: channel 0: new [client-session]&lt;BR /&gt;
debug2: channel 0: send open&lt;BR /&gt;
debug1: Entering interactive session.&lt;BR /&gt;
debug2: callback start&lt;BR /&gt;
debug2: client_session2_setup: id 0&lt;BR /&gt;
debug1: Sending environment.&lt;BR /&gt;
debug1: Sending command: show ipstats&lt;BR /&gt;
debug2: channel 0: request exec confirm 1&lt;BR /&gt;
debug2: fd 3 setting TCP_NODELAY&lt;BR /&gt;
debug2: callback done&lt;BR /&gt;
debug2: channel 0: open confirm rwindow 16384 rmax 32768&lt;BR /&gt;
debug2: channel 0: read&amp;lt;=0 rfd 4 len 0&lt;BR /&gt;
debug2: channel 0: read failed&lt;BR /&gt;
debug2: channel 0: close_read&lt;BR /&gt;
debug2: channel 0: input open -&amp;gt; drain&lt;BR /&gt;
debug2: channel 0: ibuf empty&lt;BR /&gt;
debug2: channel 0: send eof&lt;BR /&gt;
debug2: channel 0: input drain -&amp;gt; closed&lt;BR /&gt;
debug2: channel_input_confirm: type 99 id 0&lt;BR /&gt;
debug2: exec request accepted on channel 0&lt;BR /&gt;
debug2: channel 0: rcvd eof&lt;BR /&gt;
debug2: channel 0: output open -&amp;gt; drain&lt;BR /&gt;
debug2: channel 0: rcvd close&lt;BR /&gt;
debug2: channel 0: obuf empty&lt;BR /&gt;
debug2: channel 0: close_write&lt;BR /&gt;
debug2: channel 0: output drain -&amp;gt; closed&lt;BR /&gt;
debug2: channel 0: almost dead&lt;BR /&gt;
debug2: channel 0: gc: notify user&lt;BR /&gt;
debug2: channel 0: gc: user detached&lt;BR /&gt;
debug2: channel 0: send close&lt;BR /&gt;
debug2: channel 0: is dead&lt;BR /&gt;
debug2: channel 0: garbage collecting&lt;BR /&gt;
debug1: channel 0: free: client-session, nchannels 1&lt;BR /&gt;
debug1: fd 0 clearing O_NONBLOCK&lt;BR /&gt;
debug1: fd 1 clearing O_NONBLOCK&lt;BR /&gt;
debug1: fd 2 clearing O_NONBLOCK&lt;BR /&gt;
Transferred: sent 1960, received 2008 bytes, in 0.1 seconds&lt;BR /&gt;
Bytes per second: sent 21000.3, received 21514.6&lt;BR /&gt;
debug1: Exit status -1&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 13 May 2016 19:55:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56926#M16745</guid>
      <dc:creator>Iván_García_Díe</dc:creator>
      <dc:date>2016-05-13T19:55:00Z</dc:date>
    </item>
    <item>
      <title>RE: Impossible to get output of remote ssh commands via cron</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56927#M16746</link>
      <description>Hello Ivan,&lt;BR /&gt;
&lt;BR /&gt;
did you try to use &lt;I&gt;two&lt;/I&gt; -t options?&lt;BR /&gt;
ssh -o "StrictHostKeyChecking no" -t -t admin@10.26.196.189 "show ipstats"As I understand it more than one -t option is needed to &lt;I&gt;really&lt;/I&gt; force pseudo-tty allocation.&lt;BR /&gt;
&lt;BR /&gt;
Erik&lt;BR /&gt;
&lt;BR /&gt;
Edit: Just re-read your first post, you wrote that you already tried -tt...</description>
      <pubDate>Fri, 13 May 2016 19:55:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56927#M16746</guid>
      <dc:creator>Erik_Auerswald</dc:creator>
      <dc:date>2016-05-13T19:55:00Z</dc:date>
    </item>
    <item>
      <title>RE: Impossible to get output of remote ssh commands via cron</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56928#M16747</link>
      <description>Hm, I have just tested this with an X460-G2, EXOS 21.1.1.4, OpenSSH_6.6.1p1, and ISC cron 3.0pl1-124ubuntu2 on Ubuntu 14.04. The original command works fine, both from the command line and from cron (crontab of an unprivileged user). I have tested both from inside a BASH script and the ssh command directly in the crontab entry. No "-t" options needed.&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Tue, 17 May 2016 14:53:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56928#M16747</guid>
      <dc:creator>Erik_Auerswald</dc:creator>
      <dc:date>2016-05-17T14:53:00Z</dc:date>
    </item>
    <item>
      <title>RE: Impossible to get output of remote ssh commands via cron</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56929#M16748</link>
      <description>I dont understand why it fails in my case. And only with this device.&lt;BR /&gt;
&lt;BR /&gt;
But finally, trying another ways i succeeded using expect. The output of the command is saved in the expect log.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Tue, 17 May 2016 16:14:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56929#M16748</guid>
      <dc:creator>Iván_García_Díe</dc:creator>
      <dc:date>2016-05-17T16:14:00Z</dc:date>
    </item>
    <item>
      <title>RE: Impossible to get output of remote ssh commands via cron</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56930#M16749</link>
      <description>Getting closer...&lt;BR /&gt;
&lt;BR /&gt;
I have tested with an X450e-24p with EXOS 15.3.5.2, there I see the reported problem. I do not receive the switch output if the command is started from cron or with STDIN redirected from /dev/null. This seems to be an issue with the older firmware. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Tue, 17 May 2016 16:15:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56930#M16749</guid>
      <dc:creator>Erik_Auerswald</dc:creator>
      <dc:date>2016-05-17T16:15:00Z</dc:date>
    </item>
    <item>
      <title>RE: Impossible to get output of remote ssh commands via cron</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56931#M16750</link>
      <description>I have the same problem using a perl script.  We are using the script to grab the configuration on a nightly basis, then commit the files to git for version control, backup, archive, etc.&lt;BR /&gt;
&lt;BR /&gt;
The script executes perfectly if I run it manually from command line.  However, running the same script within cron and it fails.  I have a user account using a ssh user-key added to the admin account on the switch.&lt;BR /&gt;
&lt;BR /&gt;
Here's the command executing by the script:&lt;BR /&gt;
"ssh -oStrictHostKeyChecking=no admin\@$xxrip upload configuration $tftpserver $xxrname.xsf" where $xxrip, $tftpserver and $xxrname are passed into the command from a hash.&lt;BR /&gt;
&lt;BR /&gt;
I've tried adding the -t -t option but no change.&lt;BR /&gt;
&lt;BR /&gt;
My error code from the perl script for this command is 255, both from running the script manually, or through cron - I'm guessing 255 is "all ok" as the script works just fine running manually.  However, the configuration file is never uploaded to my tftp server when running the script through cron.&lt;BR /&gt;
&lt;BR /&gt;
I contacted tech support and opened a case (#01203422), but they've passed me off with the following: &lt;BR /&gt;
I   wanted to follow up with you on this case. Unfortunately at this point   there's nothing more we can do to troubleshoot this as this is an issue   with KRON  and not the switch itself. Have you tried to contact support   for the scheduler?"&lt;BR /&gt;
&lt;BR /&gt;
I'm looking for any help with this.  I can share my perl script and git methods with anyone that is interested.  Having a copy of the latest configuration(s) has saved me a few times.&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Sat, 09 Jul 2016 01:51:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56931#M16750</guid>
      <dc:creator>Bart_Wallace</dc:creator>
      <dc:date>2016-07-09T01:51:00Z</dc:date>
    </item>
    <item>
      <title>RE: Impossible to get output of remote ssh commands via cron</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56932#M16751</link>
      <description>Hello Bart,&lt;BR /&gt;
&lt;BR /&gt;
which version of EXOS do you use? In my testing older firmware versions did not work, while newer did.&lt;BR /&gt;
&lt;BR /&gt;
Did you try to run your script with /dev/null as STDIN from a terminal window? That resulted in the same problem as running the command from cron for me.&lt;BR /&gt;
$ my_script HTH,&lt;BR /&gt;
Erik</description>
      <pubDate>Sat, 09 Jul 2016 20:08:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56932#M16751</guid>
      <dc:creator>Erik_Auerswald</dc:creator>
      <dc:date>2016-07-09T20:08:00Z</dc:date>
    </item>
    <item>
      <title>RE: Impossible to get output of remote ssh commands via cron</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56933#M16752</link>
      <description>Erik,&lt;BR /&gt;
&lt;BR /&gt;
I'm using on all my switches:&lt;BR /&gt;
Image   : ExtremeXOS version 15.3.5.2 v1535b2-patch1-9 by release-manager&lt;BR /&gt;
          on Fri Dec 11 12:07:39 EST 2015&lt;BR /&gt;
BootROM : 1.0.3.5&lt;BR /&gt;
&lt;BR /&gt;
I get the same result as you do with running my_script 
&lt;BR /&gt;
Which version are you running?&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Sat, 09 Jul 2016 20:08:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56933#M16752</guid>
      <dc:creator>Bart_Wallace</dc:creator>
      <dc:date>2016-07-09T20:08:00Z</dc:date>
    </item>
    <item>
      <title>RE: Impossible to get output of remote ssh commands via cron</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56934#M16753</link>
      <description>Hi Bart,&lt;BR /&gt;
&lt;BR /&gt;
I am using the same version (the x450e switches I am using cannot run newer EXOS versions). When testing this with the EXOS-VM version 21.1.14, ssh commands work fine with STDIN redirected from /dev/null, so inbetween those EXOS version something was changed. It might be a side effect of the newer SSH code in 21.1.&lt;BR /&gt;
&lt;BR /&gt;
To summarize the situation for EXOS 15.3:&lt;BR /&gt;
&lt;UL&gt; 
&lt;LI&gt;SSH commands work fine from an interactive shell (e.g. terminal window) 
&lt;/LI&gt;&lt;LI&gt;SSH commands with STDIN redirected from /dev/null do not work from an interactive shell (neither with ssh -n nor ssh SSH commands from a script started via cron do not work (here STDIN is redirected from /dev/null by cron) 
&lt;/LI&gt;&lt;LI&gt;expect can be used to work around this issue (e.g. the original TCL based expect, or a Perl extpect module, or one for Python)&lt;/LI&gt;&lt;/UL&gt;I have successfully tested a simple expect script with EXOS 15.3 today. Expect provides the input to SSH on STDIN.&lt;BR /&gt;
&lt;BR /&gt;
With EXOS version 21.1, SSH commands work even with STDIN redirected from /dev/null, e.g. when used via cron.&lt;BR /&gt;
&lt;BR /&gt;
Best regards,&lt;BR /&gt;
Erik</description>
      <pubDate>Sat, 09 Jul 2016 20:08:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56934#M16753</guid>
      <dc:creator>Erik_Auerswald</dc:creator>
      <dc:date>2016-07-09T20:08:00Z</dc:date>
    </item>
    <item>
      <title>RE: Impossible to get output of remote ssh commands via cron</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56935#M16754</link>
      <description>Erik,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the info.  I'll look into expect perl modules.  Can you provide the simple script you tested today so I can verify results?&lt;BR /&gt;
&lt;BR /&gt;
Bart&lt;BR /&gt;</description>
      <pubDate>Sat, 09 Jul 2016 20:08:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56935#M16754</guid>
      <dc:creator>Bart_Wallace</dc:creator>
      <dc:date>2016-07-09T20:08:00Z</dc:date>
    </item>
    <item>
      <title>RE: Impossible to get output of remote ssh commands via cron</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56936#M16755</link>
      <description>Bart,&lt;BR /&gt;
&lt;BR /&gt;
I'm not in the office today, but I plan to add the script to this thread tomorrow.&lt;BR /&gt;
&lt;BR /&gt;
Erik&lt;BR /&gt;</description>
      <pubDate>Sat, 09 Jul 2016 20:08:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56936#M16755</guid>
      <dc:creator>Erik_Auerswald</dc:creator>
      <dc:date>2016-07-09T20:08:00Z</dc:date>
    </item>
    <item>
      <title>RE: Impossible to get output of remote ssh commands via cron</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56937#M16756</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have used the following simple script just to test the switch behavior with SSH via expect. The switches had my SSH key configured for admin access. The switch IP address needs to be adjusted, of course.&lt;BR /&gt;
#! /usr/bin/expect -f spawn ssh admin@192.0.2.11 expect {     {# } {send "show version\r"} } expect {     {# } {send "exit\r"} }The expect script waits for the switch prompt (login w/o password handled via SSH), issues the command "show version", and logs off the switch after detecting the prompt again.&lt;BR /&gt;
&lt;BR /&gt;
Br,&lt;BR /&gt;
Erik</description>
      <pubDate>Sat, 09 Jul 2016 20:08:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/impossible-to-get-output-of-remote-ssh-commands-via-cron/m-p/56937#M16756</guid>
      <dc:creator>Erik_Auerswald</dc:creator>
      <dc:date>2016-07-09T20:08:00Z</dc:date>
    </item>
  </channel>
</rss>

