Executing a shell script (program) on remote UNIX server.

Advertisement

joelignall
Joined:
Posts:
10
Location:
Work

Executing a shell script (program) on remote UNIX server.

Hello, I saw one topic answered in the negative but I figured I'd give this a shot anyway. Does anyone know how to run a shell script (program) on a remote UNIX server? The SSH Windows XP version we use (Tectia) has the following sytanx for running remote scripts;
"ssh2 UserID@Machine /alps/system/ialps_remove.ksh"

Thanks!

Reply with quote E-mail

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,442
Location:
Prague, Czechia

Re: Executing a shell script (program) on remote UNIX server.

So do you want to execute the script with WinSCP, instead of with Tectia?
You can do it this way:
winscp.com /command "open UserID@Machine" "call /alps/system/ialps_remove.ksh"

Reply with quote

joelignall
Joined:
Posts:
10
Location:
Work

Thank you very much, extremely helpful. I only had to tweak what you sent slightly in order to have passwordless execution (no prompts). In case it helps anyone else, here is my sample.

winscp.com /command "open username:pw@servername" "call /home/x104150/testscript.ksh" "exit"

Thanks again!!!

Reply with quote E-mail

joel ignall
Guest

calling a .bat file

Hi Ipathi, this is a sample from my notes.

sftp2 -B C:\Progra~1\iMarket\system\ascii.ftp <user>@<server>

hope this helps

Reply with quote

Advertisement

Lpathi
Guest

Hi joelignall,

Thank you for the reply.
My batch file is in remote server.
I am trying to achieving is the below one,
WinSCP.com /command "open Site1" "call test.bat" "exit"

Regards,
Lpathi

Reply with quote

lpathi
Guest

thank martin.

Is there anyway to use WinSCP site name to work with plink.
And also, i tried to use "winscp.com -filezilla <filezilla site>" it says site name does not exist.
1. From WinSCP proxy setings are not working, but with filezilla proxy is working.
2. We need to run batch file which is situated in Remote server, which you said I can use plink. While trying to configure SFTP windows in PuTTY not working.

Thanks and Regards,
lpathi

Reply with quote

martin
Site Admin
martin avatar

Is your question "How to configure proxy in Plink the same way you have it in FileZilla"?

We do not know what proxy settings you have configured in FileZilla. This is the first time you have mentioned proxy.

Reply with quote

Advertisement

lpathi
Guest

Hi Martin,
Sorry about the confusion, there are two tasks

1.
Since remote batch file is not working from WinSCP. As you mentioned about plink.
My Question about plink is "Can we access WinSCP site names from plink. If so syntax please.

2.
Another, accessing filezilla site name from WinSCP, in my previous post I mentioned the syntax I tried to achieve
a. Filezilla command line not working for us. ( filezilla has limited on CLI)
b. Filezila is working fine with Proxy with Site1. We tried to set up the same details on WinSCP not working.
getting connection timeout.

Thanks and Regards,
lpathi

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,442
Location:
Prague, Czechia

lpathi wrote:

Since remote batch file is not working from WinSCP. As you mentioned about plink.
My Question about plink is "Can we access WinSCP site names from plink. If so syntax please.
No.

Another, accessing filezilla site name from WinSCP, in my previous post I mentioned the syntax I tried to achieve
a. Filezilla command line not working for us. ( filezilla has limited on CLI)
b. Filezila is working fine with Proxy with Site1. We tried to set up the same details on WinSCP not working.
getting connection timeout.
You can import sites from FileZilla:
https://winscp.net/eng/docs/ui_import
But only (unreleased) WinSCP 5.10 imports proxy configuration too.
I can provide you a development build of WinSCP 5.10, if you contact me on my email address.

Reply with quote

Advertisement

You can post new topics in this forum