Ssh remote execute invalid command

Hi All,

i have setup my public key in vyos and verified i can connect no problems without a password and run commands no problem

but whenever i try to run a command remotely, im getting Invalid command and im not sure why?

PS C:\Users\sas_2\Documents\Developer\talos> ssh vyos@ “show ip bgp”
Invalid command: [show]

PS C:\Users\sas_2\Documents\Developer\talos> ssh vyos@
Welcome to VyOS!

Check out project news at
and feel free to report bugs at

You can change this banner using “set system login banner post-login” command.

VyOS is a free software distribution that includes multiple components,
you can check individual component licenses under /usr/share/doc/*/copyright
Last login: Mon Jul 3 11:20:04 2023 from

vyos@vyos:~$ show ip bgp
BGP table version is 77, local router ID is, vrf id 0
Default local pref 100, local AS 65000
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop’s vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network          Next Hop            Metric LocPrf Weight Path

*>i192.168.251.251/32 100 0 i
*=i 100 0 i
*=i 100 0 i
*>i217.123.123.124/32 100 0 i
*=i 100 0 i
*=i 100 0 i
*>i217.123.123.125/32 100 0 i

Displayed 3 routes and 7 total paths

You should use /opt/vyatta/bin/vyatta-op-cmd-wrapper

$ ssh vyos@ /opt/vyatta/bin/vyatta-op-cmd-wrapper show interfaces
Warning: Permanently added '' (ED25519) to the list of known hosts.
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0                    u/u  WAN
eth1                         u/u  
eth2             -                                 u/u  
eth3             -                                 u/u  


legend! thank you!

the docs show a completely different way of doing things but didnt work either
where are the docs, can i submit a PR to update it?

1 Like

Hi @si458,

on the top right there is an „Edit on GitHub“ button. Just use it to help improve our documentation. Thanks!

Yeh found it yday sorry meant to say, the pr got rejected cuz it’s an old function