Remotely access Command Shell of a Windows system

2

2

Which is the best way to remotely access command shell(cmd) of a remote system. I need to run certain command line applications in my office system from home? Is there any platform independent tool to do it, eg to access windows command prompt of office computer from linux machine at home.

darthvader

Posted 2009-08-26T10:19:29.863

Reputation: 3 709

Answers

2

It sounds like your best bet would be SSH. There are several options available for installing it on Windows, see here for a good article summarising them.

You could also use Cygwin and set up its openssh package from within it. This will provide you with a bash shell available remotely. For your purposes though, the previous option would probably suit you better as you will be able to access the traditional windows cmd prompt.

Mark Embling

Posted 2009-08-26T10:19:29.863

Reputation: 301

+1. SSH was designed exactly for this scenario, and it's very secure. – Chris W. Rea – 2009-08-26T12:47:58.180

2

It looks like PowerShell might be your best option. There was a similar question asked on StackOverflow a while back.

firedfly

Posted 2009-08-26T10:19:29.863

Reputation: 1 611

Is it not the case that using powershell one would be restricted to Windows at both ends - the question specifically asks for a solution allowing administration of a Windows machine from a linux one. However, maybe its worth looking into Pash (http://pash.sourceforge.net/), an open source powershell clone based on Mono. Its not yet finished so may not be up to the job.

– Mark Embling – 2009-08-26T11:14:40.080

@Splash - I obviously did not read the question closely enough. Pash looks interesting, though. – firedfly – 2009-08-26T11:44:09.180

1

Sysinternal's PSExec (part of PSTools) allows a command line to be executed remotely (or in a different session locally). This is not interactive however.

Richard

Posted 2009-08-26T10:19:29.863

Reputation: 8 152

0

I haven't tried this yet on Linux, but have a look on Hamachi. It will allow to configure a VPN which will allow you to establish connection via the Internet.

Darnell

Posted 2009-08-26T10:19:29.863

Reputation:

0

Pstools's psexec can do that:

psExec \\computer cmd.exe

netcat (Cygwin and several ports to Windows are available) can also do it. Run this on the remote machine:

nc.exe -l -p6969 -d -e cmd.exe -L

And this on your local:

nc.exe 192.168.1.1 6969

IPs and ports are just examples. Also check Ncat, which claims to be an improved and up-to-date version of Netcat.

Pere

Posted 2009-08-26T10:19:29.863

Reputation: 749