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

Author Message
joelignall
[View user's profile]

Joined: 2011-11-16
Posts: 9
Location: Work
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!
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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"
_________________
Martin Prikryl
joelignall
[View user's profile]

Joined: 2011-11-16
Posts: 9
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!!!
lpathi

Guest


how to call a batch file just like shell script.

Thanks and Regards,
lpathi
joel ignall

Guest


Hi Ipathi, this is a sample from my notes.

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

hope this helps
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
WinSCP is not the right tool for executing remote scripts. Use Plink from PuTTY package.
https://the.earth.li/~sgtatham/putty/0.67/htmldoc/Chapter7.html
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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.
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
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.

Quote:

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.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License