ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to execute a command remotely using perl script from windows to linux, for example
Assume that there is remote Linux machine say 192.168.251.19
i know the login and password of Machine as
login: root
password : root123
Now from the Remote Windows Machine with the above details I want to execute a command on linux say 'reboot' command or 'ps' command or any other command.
Is there any utility for windows/linux so that i can execute the commands remotely from windows (there should not be any user interaction required).
Basically i will be able to call that utility from my perl program if there are no user interaction,a kind of silent command execution
Make sure you have an ssh daemon (sshd) running on the Linux machine and ssh to it from the Windows machine using PuTTY. Read the PuTTY manual for a more detailed explanation, although its UI is pretty straightforward.
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088
Rep:
I am not sure if this works with Putty as well, but here are instructions on how to use ssh with no password prompt (At the bottom of the page). Basically, it is using a private / public key pair to do the authentication instead of a password.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.