Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

How to connect to a Windows server from Linux

by daghostdog (Initiate)
on May 31, 2007 at 19:14 UTC ( [id://618567]=perlquestion: print w/replies, xml ) Need Help??

daghostdog has asked for the wisdom of the Perl Monks concerning the following question:

I'm looking for a method to connect from a Linux server to a Windows server in order to run a command, record the output, and then close the connection. I realize that the authentication will probably be NTLM but I wanted to find out if anyone has successfully accomplished this. Thanks!
  • Comment on How to connect to a Windows server from Linux

Replies are listed 'Best First'.
Re: How to connect to a Windows server from Linux
by perlfan (Vicar) on May 31, 2007 at 19:30 UTC
    Not that this is Perl related, but you can set up sshd inside Cygwin.
Re: How to connect to a Windows server from Linux
by CountZero (Bishop) on May 31, 2007 at 21:01 UTC
    My rough guess is that it is probably rather irrelevant on what machine your connection starts and where it ends. I regularly log-in to a Linux-server from my Windows XP laptop with "PuTTY" and the Linux-server "connects" to the laptop with rsync to back it up. And Nagios runs across my whole network of Linux and Windows machines to check if they are still alive (using "ping").

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: How to connect to a Windows server from Linux
by Marza (Vicar) on May 31, 2007 at 20:14 UTC
    What command are you trying to run? Sometimes there is an unknown module that can handle things.....In other words; a little more info please.
      Basically, I've got some event correlation software churning through data and I want to log into a Windows box and add a route. So I'd need to: 1. Connect to Windows Box to use CLI 2. Run command "Route add IP" 3. Record output on linux server 4. Close connection
Re: How to connect to a Windows server from Linux
by Old_Gray_Bear (Bishop) on May 31, 2007 at 21:02 UTC
    To take a look at PuTTY. This is a ssh client for the Wintel environment.

    ----
    I Go Back to Sleep, Now.

    OGB

Re: How to connect to a Windows server from Linux
by regexes (Hermit) on Jun 01, 2007 at 07:37 UTC
    Hello,

    I might be misunderstanding exactly what you're looking for, however, if you simply want to run a command, wait for the output, and record it... a possibilty with Perl is Net::Telnet?
    (If you have a telnet service running on the box)

    Connecting to a Windows box this way does have it's drawbacks because of the way Telnet is handled by Msoft. But it is doable.


    -------------------------
    Cave ab homine unius libri

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-26 03:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found