network device discovery - error for unsupported shell

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2019 12:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2019 01:32 PM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2019 03:04 PM
thanks, Tim. for adding the support for unlisted bourne-compatible shells, would that be on ServiceNow end or somewhere else?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2019 08:40 PM
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:
- "echo $0" outputs the default shell.
- There is an environment variable PATH containing a colon-separated list of path items.
- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2020 01:10 PM
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?