execute a script on test server from dev server


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users execute a script on test server from dev server
# 1  
Old 08-18-2008
execute a script on test server from dev server

I need to execute a script from dev server which is located on Test server.I can use ftp to connect to dev server and from there how can i execute a command on test server.

Thanks
# 2  
Old 08-18-2008
You can't execute commands over ftp unless you hack the ftp server to support this. Perhaps you could use ssh instead. Or if the command is well-defined, you could drop a particular file over ftp to signal to a process on the server to execute some predefined command; it would then clean out the signal file when the command has completed, and resume monitoring the directory where you drop the file.

All of these themes are well explored on this site; try the search facility.
# 3  
Old 08-18-2008
I am able to execute a command with ssh option.But i am facing one problem.before executing a script i need to execute my .profile also.because i have some env varaibles which comes from .profile and the sript will use them.
Can any one of you please help me how can i do that.
# 4  
Old 08-18-2008
Code:
ssh remote '. .profile; othercommands'

I'm a bit puzzled about the .profile comment, though. If ssh is correctly configured, it should run your .profile already.
# 5  
Old 08-18-2008
I am getting the following error when i tried to exucte .profile in ssh command

stty: tcgetattr: Not a typewriter
# 6  
Old 08-18-2008
You should not have stty in your .profile. Maybe ssh -t could help, though. Nevertheless, the warning just means stty didn't run, not that the whole command line failed.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute a shell script in UNIX server from Cygwin

Hi All, We have shell scripts in UNIX ( Sun OS ) server. Also in my windows machine i have Cygwin installed. Now is there a way to execute Shell script available in UNIX server from Cygwin? (4 Replies)
Discussion started by: Girish19
4 Replies

2. Shell Programming and Scripting

How to execute a shell script that resides in another server?

hi, i have a shellscipt that is in another server, my question is how do i run the script from a different server. EXAMPLE: SCRIPT_NAME: sample.sh SERVER: A what i wanted to achieve is to call that script from server B. Tried using ssh ssh <username>@serverB /home/sample.sh but... (5 Replies)
Discussion started by: reignangel2003
5 Replies

3. Shell Programming and Scripting

Shell script to copy a file from one server to anther server and execute the binary

Hi , Is there any script to copy a files (weblogic bianary + silent.xml ) from one server (linux) to another servers and then execute the copy file. We want to copy a file on multiple servers and run the installation. Thanks (1 Reply)
Discussion started by: Nawrajesh
1 Replies

4. Shell Programming and Scripting

Execute a local script against a remote server

I am unable to run the below script against a remote server due to syntax error (then unexpected), but i am able to run it locally. Am i executing it correctly or is there any other way to execute it. ssh username@servernname ksh -s < scriptname #!/bin/ksh function record { ((end =... (5 Replies)
Discussion started by: NarayanaPrakash
5 Replies

5. Shell Programming and Scripting

Sftp script for dev server to client server

hi, i am new to unix, cuold u send some sftp acripts to send files to dev server to clint server, (1 Reply)
Discussion started by: Koti.annam
1 Replies

6. Shell Programming and Scripting

Bash script to test IP range on server

Hello, We have to configure servers with a range of IPs which is in itself a subject for another script assistance request -but- we have run into quite a few IP ranges with routing problems lately. I've been trying to figure out the best way to test a range of IPs, I mean, manually it's not... (4 Replies)
Discussion started by: boxgoboom
4 Replies

7. Shell Programming and Scripting

how to execute shell script in another server that contain sql.

hi all, how to execute shell script in another server that contain sql script. i tried using "ssh -l" option.. but i am unable to load the environment variable of the remote host. please suggest how execute the shell script contain sql part inside it. (2 Replies)
Discussion started by: sandeep909
2 Replies

8. Shell Programming and Scripting

Connect to differect server and execute the script

Hello Everyody Please help me with the below problem. I have two servers names server1 and server2. From server1, i have to connect to server2 and execute a script residing on server2. How can i achieve this? (6 Replies)
Discussion started by: vasuarjula
6 Replies

9. UNIX for Dummies Questions & Answers

Script to Test Application Server is running

Hi, I'm a complete novice at Unix and need to create a script that does the following... checks to see if an application server is running. If the app is running then print 'Available' Else print 'Unavaliable' exit from scriopt I have no idea where to start. I'd be very grateful... (0 Replies)
Discussion started by: duglover
0 Replies
Login or Register to Ask a Question