Getting tsh:invalid options -- 'c'\n error while running command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2023 09:55 PM
Hi,
Could someone please help me on this error? why I am getting this even after making a successful connection.
tsh:invalid options -- 'c'\n
I am trying to execute this command from my .Net 6 application through Renci.SshNet library.
Thanks in advance
Thanks
- Labels:
-
APIs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2023 12:53 PM
This section of the community is specific to network access control, endpoint access to the network so you won't find many folks in here that are familiar with .net.
But this is also not going to be a Cisco specific problem but a problem with what you are passing in code, or with the library. Where is the "c" coming from before you send the "\n" or return/newline. A single "c" alone is not a valid cisco CLI command.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 07:48 AM
Sorry I don't know what platform / software / technology you are talking about.
You will need to be a lot more specific.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2025 05:25 AM
Hello,
Have you found a solution for your problem?
I have the same issue but this occurs when doing the process of login and, in the same time, sending a command.
The same error message appears when using ssh from a linux machine and sending the following command :
ssh admin@X.X.X.X 'command XXX'
(admin@X.X.X.X) Password:
tsh: invalid option -- 'c'
