Running a KSH file from VPS on Godaddy


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Running a KSH file from VPS on Godaddy
# 1  
Old 05-19-2015
Question Running a KSH file from VPS on Godaddy

i have looked for a week and tried a few things, but nothing seems to work so joined here.

I have a go daddy account and also a vps in germany. In my vps, i run a code script (we will call it codegen) when i run
Code:
./codegen

i get my question of how many codes do i want to make. With my answer on the screen, my codes are made and as the same time the codes are put in a file called /var/etc/codes.cfg to be read by my other script every 1 min.

great! But i want this file linked from a script i have on godaddy. i can run the script codegen ok on godaddy and of course can make a file called codes.cfg with the codes inside, but as this is not on my vps. its pointless as the codes cant be used for access as my program is on my vps and scans that code.cfg every min for new codes to allow.
how can i link godaddy to my vps to run codegen?
i was guessing that codegen can be run from within another script.
so I added this to another script i have:
Code:
return shell_exec(__DIR__ . "/codegen $arg");

This works great on my VPS. 80% all ok, but as i stated. how can i change the above to run from ssh or login from go daddy to vps?

i followed about 8 ways from goggling and nothing works.

many thanks

BTW i`m very very very new to all coding, so maybe a step by step?


I guessed was something to do with ssh keys and making a key, tried that and no luck.
# 2  
Old 05-19-2015
Has the script been copied to your VPS, or do you just have the file locally?
# 3  
Old 05-19-2015
good evening

i have the file on both godaddy and also my vps

in my vps its in the root

on go daddy in the config file folder inside the software
# 4  
Old 05-19-2015
Can you ssh into your VPS using a password?
# 5  
Old 05-19-2015
yes i can and do so daily to run updates ect

i followed this guide

Code:
http://www.linuxproblem.org/art_9.html

and can log on to my vps from ssh on go daddy, all i need is how to run file please

as in what to add into the line to run file

Last edited by uksatman; 05-19-2015 at 04:30 PM..
# 6  
Old 05-19-2015
ssh username@host bash /scriptname.sh

If you're running it from cron or something, you might need to do something like ssh -i /home/.ssh/id_rsa username@host bash /scriptname.sh
# 7  
Old 05-19-2015
i did try that as this

ssh username@host bash /codegen

-bash: /usr/bin/ssh: Permission denied

it seems soon as i close ssh on godaddy (testing ) the so called link above as i quoted the guide, does work mate.
Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Wget Cronjob, Godaddy.

Hello, I'm trying to automate a wget cronjob for Php 5.4 on Wordpress - using Cpannel on a linux server hosted by Godaddy. Below is the command I'm using, which isn't working. wget -q -O "/wp-cron.php?import_key=&import_id=&action=trigger" >/dev/null 2>&1 ========== EDIT Thank you so... (5 Replies)
Discussion started by: embus
5 Replies

2. Shell Programming and Scripting

How to download Images and Json file from server(godaddy) to Local machine (Ubuntu 14.04).?

Hi Guys, Just entering the Linux word, So I need help to write a script on my local machine(Ubuntu 14.04) that continuously check the particular folder(contains images) and a json file on the server and download whenever new images are added to that folder and whenever there is a change in the... (10 Replies)
Discussion started by: g4v1n
10 Replies

3. UNIX for Dummies Questions & Answers

Postfix Dovecot Roundcube Godaddy

Long story short, I have everything working in my SOHO which would include Postfix,Dovecot(imap),Roundcube,bind and is ready to recieve email from the outside using this tutorial: https://workaround.org/ispmail/wheezy I also setup my internal DNS server using: https://wiki.debian.org/Bind9... (2 Replies)
Discussion started by: metallica1973
2 Replies

4. UNIX for Advanced & Expert Users

Running scripts without a hashbang - ksh anomaly?

I noticed some strange looking parameters on some processes on one of our servers, and after a little playing around we deduced that ksh seemed to be adding a (somewhat random) extra parameter when calling a script without a hashbang in it. It looks like it's the partial name of the parent... (10 Replies)
Discussion started by: CarloM
10 Replies

5. Shell Programming and Scripting

Running executables in ksh

I am trying a set up a very simple korn shell script. It has 2 basic steps. Firstly I read the first line of a text file (which is a file name) Secondly I run a fortran executable using that line I must be doing something wring because it wouldn't work. I know that the executable wants the... (4 Replies)
Discussion started by: larangunn
4 Replies

6. Solaris

Problems Running KSH on Solaris 10

Hi, I am currently in the process of testing upgrading from Solaris 8 to Solaris 10. one problem i have encountered is when i am running any of my batch scripts. All my scripts start with #! /bin/ksh so that they will excuted in the ksh shell. but the scripts will not run correctly. The... (3 Replies)
Discussion started by: dshakey
3 Replies

7. Windows & DOS: Issues & Discussions

Running KSH script In SFU

I tried to run my ksh scripts in SFU and it always says "not found" as in the example below: $ .file /bin/ksh: .file: not found Did I miss something in the SFU Installation? (2 Replies)
Discussion started by: ilak1008
2 Replies

8. Shell Programming and Scripting

Editing file during running ksh in HP failed

Hi falks, I have the following program: #!/bin/ksh ed -s /home/ias/v9.0.3/j2ee/OC4J_RiGHTv_HPCD2/applications/Xbip/Xbip/WEB -INF/config/application.properties <<EOF >/dev/null 1 d . d . a application.filePath.core = /core-HPCD2/Html/ application.filePath.xbip =... (2 Replies)
Discussion started by: nir_s
2 Replies
Login or Register to Ask a Question