Cannot connect to remote computer on private network via PsExec

2

I have two computers connected to a router. Both have PsExec in sys32. Files and Printer sharing are enabled and firewall exception is disabled for PsExec.

On first computer in Command Prompt I ran:

psexec -u user \\192.168.1.4 cmd

After a while this shows up:

Couldn't access 192.168.1.4
Access denied

I confirmed that Domain\User is invalid. user is a Administrator on target machine.

What is missing?

Edit: First laptop is running Windows 7 and second is running Windows 8.

Wiszen

Posted 2017-05-06T11:50:19.123

Reputation: 23

user is a Administrator...on 192.168.1.4, correct? This sounds like a firewall issue. Try temporarily disabling the firewall on 192.168.1.4. – I say Reinstate Monica – 2017-05-06T13:39:37.907

Maybe you need to add the domain name to the user name: -u domain\user – Tobias Knauss – 2017-05-07T07:08:59.653

@Twisty you are right! So what exact property on Firewall i need to do? I don't want to disable firewall. – Wiszen – 2017-05-07T08:49:55.993

Answers

1

On the machine you want to remotely access with PsExec, enable the following Inbound firewall rules in the predefined File and Printer Sharing group:

  • NB-Datagram-In
  • NB-Name-In
  • NB-Session-In

enter image description here

With these rules enabled, users with Administrative permissions on the machine will be able to issue commands remotely via PsExec.

I say Reinstate Monica

Posted 2017-05-06T11:50:19.123

Reputation: 21 477