01-21-2009 05:35 AM
Hi, have somebody found howto execute noninteractive 1 command through ssh or telnet on brocade?
I need execute just one info command from my batch in the way as is usual in SSH : ssh -pw password email@example.com switchshow.
On brocade ssh fails with rbash: switchshow: command not found, it works only by connecting and writing command by hand.
Also with telnet I am able execute command only interactive but not by batch.
I had not these problems on McData but with brocade I can not find solution.
01-22-2009 05:12 PM
I don't know what type of system you're trying to connect from If it's a linux box you can use an expect script to do the login and run the commands.
I'm not 100% but you could probably capture that output as well.
01-23-2009 01:03 AM
I am connecting from Win stations.
Now I found some ways for connecting by telnet but I prefer use ssh it´s 2009 not 1989.
I detected that If I execute command noninteractively there is different environment - I can execute pure linux commands, but after interactive connecting
I am accesing fos interpreter.
So if connect interactive there is in time of login executed fos interpreter, but in noninteractive maneer nothing and because of restricted shell,
I can not leave my directory to execute fos interpreter manually.
02-20-2009 12:00 AM
I have FABOS 5.3
I'm using expect and following syntax
ssh -ax admin@switch "bash --login -c \"command\""
The problem is that when you do an ssh you just enter an restricted shell and brocade sets its environment variables in the login shell so you force bash into a login shell.
I have tried using ssh key authentication but had some problems don't remember them, but I figured expect might be just as good.
Can anyone verify this works on 6.x versions of FABOS BTW
01-06-2017 07:07 AM
Anyone got this issue resolved.? I have tried with the previous suggested command, but no luck. The o/p is not coming.
plink.exe <IP Addr> -pw <pwd> -l admin bash -login -c 'PATH=/fabos/abin:/fabos/sbin:/fabos/bin switchstatusshow'
Mine is on windows platform and brocade OS v6.0.xx and few v5.5.xx. PLease share some inputs
01-10-2017 05:23 AM