Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

How to connect to unix machine from Windows and execute command

by Divakar (Sexton)
on Sep 25, 2012 at 08:12 UTC ( #995506=perlquestion: print w/ replies, xml ) Need Help??
Divakar has asked for the wisdom of the Perl Monks concerning the following question:

Hi Friends,

i need to know how can we login to unix machine from windows and execute command in that.

is there any way to perform using any perl modules using ssh, rsh, telnet.

Thank you...

Comment on How to connect to unix machine from Windows and execute command
Re: How to connect to unix machine from Windows and execute command
by grizzley (Chaplain) on Sep 25, 2012 at 08:36 UTC
Re: How to connect to unix machine from Windows and execute command
by FloydATC (Hermit) on Sep 25, 2012 at 12:04 UTC
    There is no standard service in Windows that lets you do this except PowerShell (available in newer versions) which is a completely closed ecosystem of signed commandlets and twisted idioms. If anyone finds a simple way to invoke PowerShell remotely using Perl they deserve a Nobel Prize.

    AFAIK you will need to either find a suitable "server" software package to install on each Windows host, or write your own. Keep in mind that if you want to use anything like this in a production environment you will need a firm understanding of the security challenges involved. How will you handle authorization and authentication in a way that does not expose sensitive information?

    Edit: As was pointed out, I read the question a liiittle too fast. :o)

    Ye Olde rsh and telnet are to be used only where security issues can be completely ignored. SSH is much better but still only as secure as the weakest endpoint; if someone finds the password or keys they will have the same access as you do.

    -- Time flies when you don't know what you're doing
      AFAIK you will need to either find a suitable "server" software package to install on each Windows host,

      Why would he need to install server packages on windows, when he want to connect from Windows to *nix?

      if someone finds the password or keys they will have the same access as you do.

      Que? Is there any solution -- to any security problem -- that remains secure if you give away the passwords and keys?


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      RIP Neil Armstrong

        Read the question a little too fast, sorry.

        The general security issue of passwords and keys being available to a script still holds though. Between Windows hosts there are systems already in place to facilitate authorization/authentication that's usually secure enough.

        Not so if you hack together a script for doing stuff cross-platform, without a firm understanding of the risks. I'm sure you're well aware but everyone else isn't.

        -- Time flies when you don't know what you're doing

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://995506]
Approved by chacham
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (11)
As of 2014-09-22 20:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (201 votes), past polls