Using PsExec to login remotely to another machine on the network
Contents
Using PsExec to login remotely to another machine on the network#
Required:#
Two virtual machines on the same subnet, Machine-A and Machine-B.
Admin privileges on Machine-A is required.
Preliminary Steps:#
Perform the following two steps on both the machines:
In the following registry path
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Systemcreate a DWORD titledLocalAccountTokenFilterPolicyand set the value to 1.Allow SMB traffic. This can be done by allowing traffic using the Firewall rules File and Printer Sharing (SMB-In)
Steps:#
Download PsExec from the official website.
On Machine-A, use cmd.exe with admin privileges
Assuming the IP address of Machine-B is 10.0.2.7, use the following command to create an interactive shell prompt with Machine-B:
psexec \\10.0.2.7 -u localAdminName -i cmd
Provide the user name of Machine-B’s local administrator account to perform the login. You will be prompted for the password.