Ability to run sas prog on remote server using SSH


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Ability to run sas prog on remote server using SSH
# 1  
Old 05-20-2009
Ability to run sas prog on remote server using SSH

Hi,
I am trying to run a sas prog on a remote server using ssh.

I have got the command that I am using in the below paragraph. With it, I was able to run shell scripts but when I tried 'sas' it errored out. I have got my keys exchanged so when I say ssh serverA I automatically connect to my remote server. (Note: All the commands in the quotations run one by one when they hit a semi-colon). I am running this on an AIX box.

When I run the below I get an error ksh: sas: not found.

ssh serverA "cd /directory/sas; pwd;ls; sas avi.sas"

Any help would be appreciated. I was thinking to do this in the above fashion. If there are any other suggestions on how to run a sas job on a remote server, please enlighten me.

Thanks,
Cool_avi
# 2  
Old 05-20-2009
Is the executable file sas, and is it executable?
avi.sas is a parameter passed in?
# 3  
Old 05-20-2009
Yes! This is an executable sas.

I tried to run the avi.sas from the remote server and it did run. The permissions are the same too. It just does not like the key word 'sas'. Once it reaches that point if bombs out saying ksh: sas: not found.

Please let me know if you need any other information.

Thanks,
Coolavi
# 4  
Old 05-20-2009
Quote:
Originally Posted by coolavi
Yes! This is an executable sas.

I tried to run the avi.sas from the remote server and it did run. The permissions are the same too. It just does not like the key word 'sas'. Once it reaches that point if bombs out saying ksh: sas: not found.

Please let me know if you need any other information.

Thanks,
Coolavi
so is avi.sas or sas the file you gonna execute?

ssh serverA "cd /directory/sas; pwd;ls; sas"

or

ssh serverA "cd /directory/sas; pwd;ls; avi.sas"

If it's genuinely "sas avi.sas" , probably sas is not in the environment. try abosulte path it.

ssh serverA "cd /directory/sas; pwd;ls; /path_to_sas/sas avi.sas"
# 5  
Old 05-22-2009
Hi Lu,
That worked! Smilie. I needed to invoke the sas before the running the prog using SSH. I did not look into that before because I was able to run the sas job on the command line on the remote server.

ssh serverA "cd /directory/sas; pwd;ls; /path_to_sas/sas avi.sas"
Thanks for the help Lu Smilie,

Coolavi
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to run command on remote server?

Hi I am trying to write a script which when I run from server A it execute few command on another server say B and show me the output. below is the script but it is not showing me the o/p of B machine but instead showing me A machine o/p every time. #!/bin/bash for i in `cat... (14 Replies)
Discussion started by: scriptor
14 Replies

2. Ubuntu

Run a script at remote server without ssh password

Hello, What I want to do is to run a file on remote server by running a script at localhost but script should not ask ssh password of my remote server when script is executed. Scenario1: To copy files from server2 to data server:$ scp -r root@server2_ip:/var/www/html/*.* /var/ When I enter... (6 Replies)
Discussion started by: baris35
6 Replies

3. Shell Programming and Scripting

How to run commands on remote server using ssh password less authentication?

Hi, I need to run a script located in a directory on remote server by using ssh authentication from my local unix server. Can anyone help me in this. I have tried the below command. It worked for echo command but when i tried to open a file using cat command it is showing "cat: cannot open... (6 Replies)
Discussion started by: ssk250
6 Replies

4. Shell Programming and Scripting

Multi server access through remote server using ssh

Team, Presently I have 5 ip address kept in ip_abc1 file, for each of the ip address listed, i need to login on each ipaddress one at a time and login as below for that specific ip address ssh -p 8101 karaf@<ip.address_for the specific ip address as logged in> password features:list... (4 Replies)
Discussion started by: whizkidash
4 Replies

5. Shell Programming and Scripting

Run scripts on remote server

I have a sql script in my parent server - host1 i can do a passwordless ssh to remote server - host1a and host1b Can i run the sql script which is present in host1 by connecting to host1a and host1b. Should i place the sql script in host1a and host1b ? Is there a way i can run without placing... (2 Replies)
Discussion started by: Nagesh_1985
2 Replies

6. UNIX for Dummies Questions & Answers

how to use ssh to run shell script on a remote machine?

how to use ssh to run shell script on a remote machine? ssh user@remote sh ./script.unx i ran the above command ./script.unx HAS NOHUP COMMAND IN ITS BODY, I AM GETTING ERROR AS NOHUP NOT FOUND... i tried to run that script from remote server, its working fine do ineed to set... (6 Replies)
Discussion started by: only4satish
6 Replies

7. Shell Programming and Scripting

Need help on how to exit a script run on a server from a remote server

hi, I am using the below line to run a script from remote server(say server A) to another server(say server B). ssh username@servername ksh script name. The issue is the script logs into server B, executes the script on server B, transfers the file to server A but does not exit from... (4 Replies)
Discussion started by: yohasini
4 Replies

8. Shell Programming and Scripting

SSH Remote login to VIO's (padmin) and run oem_setup_env

Hello all, I have been trying to run commands that collect basic info from the VIO's The issue I am having is setting the env with the "oem_setup_env" after I login as "padmin". I usually do the following: ssh server command ssh root@server date , but I need to login set the env and... (0 Replies)
Discussion started by: dfezz1
0 Replies

9. UNIX for Dummies Questions & Answers

Closing ssh when process run on remote

Hi! I currently run a very long script (two hour left...) on a remote computer through a ssh session. I wonder whats happend if I close the ssh session, or even, the terminal. Is the script running on remote will stop? Thanks for your answers, Tp (1 Reply)
Discussion started by: tipi
1 Replies

10. Shell Programming and Scripting

Issues using ssh from crontab to run remote script from

I have a solaris9 x86 server using ssh as follows: SSH Version Sun_SSH_1.0, protocol versions 1.5/2.0. The remote server solaris9 sparc has exactly the same version ssh installed. I am running a script on my server which includes the following command to run a script on the remote server:... (4 Replies)
Discussion started by: frustrated1
4 Replies
Login or Register to Ask a Question