rsh expects the hostname after the options, e.g.,
rsh -l root hdvg-1 lspci
Otherwise, it is trying to execute
grep command has an unbalanced quote, and should be something like
lspci | grep 'certain string'
If you want to verify that the
lspci command is available on your machine, you could do just
rsh -l root hdvg-1
to get a shell, and then type
lspci in that shell. By the way, since
rsh is likely an alias for
ssh, you should use
ssh to avoid confusion.
Another source of confusion is that when using remote shells, your
$PATH environment variable may not be set the same as if you logged in normally. According to a discussion in rsh server "script..." which $PATH is used ?,
rsh requires fully qualified names of executables, scripts to be safe. It uses
/usr/bin/sh (whatever that evaluates to on the remote server), and the
PATH is usually limited:
On your remote machine,
lspci may not be in the
$PATH used for the remote call.