Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8072523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:02:40+00:00 2026-06-05T14:02:40+00:00

We recently got SSH setup on our Windows boxes so we could eliminate the

  • 0

We recently got SSH setup on our Windows boxes so we could eliminate the need for disc mounts on our Linux machines. We are using Pentaho and I am writing a shell script that will, from a Linux box, SSH into the Windows box and execute a perl script.

I have able to write in a way to SSH into the windows box and switch to the directory that holds the Perl scripts that I need to execute, I just can’t figure out how to actually execute them.

This is what I have:

#!/bin/sh
ssh -t xxxxx@xxxxx "cd /path/to/script/ /path/to/perl.exe HelloWorld.pl"

I have also tried:

#!/bin/sh
ssh -t xxxxx@xxxxx "cd /path/to/directory/with/perl/script" \
                   "/path/to/perl.exe HelloWorld.pl"

Both attempts result in a short delay and then a “disconnected from xxxxx” and the perl does not run. I can do all of these steps manually through a shell, but can’t seem to get them working in script form. As a note, the only way I’ve been able to execute the perl scripts is if have the shell in the directory the perl script is in.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T14:02:41+00:00Added an answer on June 5, 2026 at 2:02 pm

    You need to use either a semi colon to end your statements, or execute with one statement.
    try the following:

    ssh xxxxx@xxxxx "cd /path/to/script/; /path/to/perl.exe HelloWorld.pl"
    

    or:

    ssh xxxxx@xxxxx "/path/to/perl.exe /path/to/script/HelloWorld.pl"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We recently got a call from one of our clients, complaining that their site
Our organization recently got TFS 2008 set up ready for our use. I have
I recently got a new workstation where I'm using Visual Studio 2008 Professional for
A problem I was working on recently got me to wishing that I could
I recently got a trial version of Windows Azure and wanted to know if
I recently got a ForeignKey clash in my Django model. I have the need
I just recently got into using vim, and am having great fun adding load
I recently got involved in a Java project at work: we're using MyEclipse for
I recently got my laptop with Apache setup on my university's Ethernet connection. Now
I recently got an e-mail from Github saying that I should review my SSH

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.