HPE EVA Storage
1753579 Members
6237 Online
108796 Solutions
New Discussion юеВ

HP 8/40 SanSwitch Remote Commands

 
bgr
Occasional Advisor

HP 8/40 SanSwitch Remote Commands

I have 2 HP 8/40 SanSwitches and they are running the same firmware, etc.

admin> version
Kernel: 2.6.14.2
Fabric OS: v6.2.0d
Made on: Wed Mar 25 18:00:46 2009
Flash: Thu May 7 16:27:12 2009
BootProm: 1.0.6

I've set them up to both accept ssh authentication and have written a little script to display information.

#!/bin/bash
ssh admin@switch << EOF > alias.txt
alishow
exit
EOF

It works fine on one switch, however on the other switch I get:

-rbash: alishow: command not found

Does anybody have idea why it would work on one and not the other?
2 REPLIES 2
bgr
Occasional Advisor

Re: HP 8/40 SanSwitch Remote Commands

Hmm, I think I've found the problem discussed in the release notes for v6.2.0d

Defect ID: DEFECT000225799 Technical Severity: High
Summary: Sshd allows admin login to execute root level Linux commands but not admin CLI commands

Symptom: Admin CLI commands executed using login admin via ssh (through the FOS sshd daemon) fail with error:
rbash: : command not found
Workaround: A workaround to facilitate execution of admin level CLI commands using ssh, is to use syntax similar to:

ssh -l admin 192.168.1.12 "rbash --login -c 'switchshow'"

Or if a command is needed that works on both older (correctly operating) FOS and the newer/affected FOS:

ssh -l admin 192.168.1.12 "switchshow || rbash --login -c 'switchshow'"

Feature: Field Escalation Function: Security
Probability: Medium Risk of Fix: High
Found in Release: FOS5.3.1 Service Request ID: 327181
bgr
Occasional Advisor

Re: HP 8/40 SanSwitch Remote Commands

Problem somewhat resolved