running linux commands with psexec from windows - network path not found

DCCurious 21 Reputation points
2021-11-16T21:20:58.41+00:00

Hi,

I've seen similar questions across the web, but all of them seem to assume that you're logging into a windows machine.

From my windows terminal using psexec, the command line is

psexec \ip -u userid -p password 'ls'

or

psexec \hostname -u userid -p password 'ls'

The error is
The network path is not found
Make sure that the default admin$ share is enabled on hostname.

The advice for resolving this, always assumes the remote pc is windows.

I'm just trying to run some simple commands in Linux from my windows pc, eventually in a batch file script that calls psexec with linux commands, then exits

No problem at all connecting via ssh with MobaXterm Pro.

Should I use the SSH tool, instead?

Btw, I don't understand how to use the Tags, when writing in the forum. I tried 'psexec' and 'linux' and 'Windows', but the form won't let me use them. So I picked teams-linux and windows-10-network.

Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
Microsoft 365 and Office | Skype for Business | Linux
0 comments No comments
{count} votes

Accepted answer
  1. MotoX80 36,401 Reputation points
    2021-11-16T22:27:19.347+00:00

    Psexec only works against Windows machines.

    Yes, use the SSH tool to connect to the Linux machine.

    If you prefer SSH, you can install the OpenSSH Server feature on your Windows machines so that you can SSH to them too. You can use the OpenSSH client as well if you don't want to use that 3rd party tool.

    https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_overview

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. DCCurious 21 Reputation points
    2021-11-16T23:45:31.047+00:00

    Thanks, Moto.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.