network device discovery - error for unsupported shell

Ravish Shetty
Tera Guru
we are getting the message for a network device discovery (for an IP switch) as
 
Unsupported shell, 'IOS.sh'', and probe parameter 'allow_unsupported_shells' is set to 'false'. Supported shells are [tcsh, csh, ksh, sh, bash]
 
how do we enforce the specific type of shell execution ('tcsh') from the ServiceNow end?
 
we are using SSH credentials.
7 REPLIES 7

tim_broberg
ServiceNow Employee
ServiceNow Employee

SSHCommand is running the command "echo $0" to detect the default shell for the account it logged in under.

For a *nix server, you'll want to edit the default shell for the account, generally in /etc/passwd.

There also exist options to add support for unlisted bourne-compatible shells or to run in a very limited mode when no supported shell is available if necessary.

thanks, Tim. for adding the support for unlisted bourne-compatible shells, would that be on ServiceNow end or somewhere else? 

ServiceNow end, specifically mid config parameter mid.ssh.shells_supported.

It defaults to "ksh,bash,sh". If you wanted to add dash, for example, you would set it to "ksh,bash,sh,dash".

Some things "Bourne-compatible" means include:

  1. "echo $0" outputs the default shell.
  2. There is an environment variable PATH containing a colon-separated list of path items.
  3. You can declare functions with a func_name() {statements} syntax

ksh, bash, and sh are tested with each release. I had good luck with dash when I tried it, but it's not routinely tested, as far as I know, which is why it's not on the default list.

If you're desperate and you can't get to a bourne-compatible shell, you can try probe parameter allow_unsupported_shells=true which disables support for paths and functions. I have seen exactly one case where it turned out to be useful on a storage device with a peculiar shell we couldn't deal with otherwise.

    - Tim.

Hi Tim, sorry to resurrect a dead thread, but can you please spell out more clearly what shell needs to be added to the list for cisco? I've added ios.sh and it's still giving me the error?