UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 24th, 2006, 08:10 AM
million1977 million1977 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Aberdeen, Scotland
Posts: 48 million1977 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 3 sec
Reputation Power: 5
Running shell script on different server

Hi,

I am new to Unix and was wondering whether it is possible to call a shell script on a different server?

(The reason I want to do this is that I have written some Java code that will only run on the Java 1.5 Virtual Machine, but the Production server is Solaris 2.6, which won't run the 1.5 JVM. I therefore need to have the Java on a newer machine. The shell script that calls the Java is called by some Pro*C code)

thanks in advance for your help
brian

Reply With Quote
  #2  
Old July 24th, 2006, 09:06 AM
Ehlanna's Avatar
Ehlanna Ehlanna is offline
Not a clue what to put ...
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2006
Location: in front of this keyboard
Posts: 815 Ehlanna User rank is Captain (20000 - 30000 Reputation Level)Ehlanna User rank is Captain (20000 - 30000 Reputation Level)Ehlanna User rank is Captain (20000 - 30000 Reputation Level)Ehlanna User rank is Captain (20000 - 30000 Reputation Level)Ehlanna User rank is Captain (20000 - 30000 Reputation Level)Ehlanna User rank is Captain (20000 - 30000 Reputation Level)Ehlanna User rank is Captain (20000 - 30000 Reputation Level)Ehlanna User rank is Captain (20000 - 30000 Reputation Level)Ehlanna User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Weeks 2 Days 5 h 36 m 20 sec
Reputation Power: 243
Yes, but you will need to set up some form of trust, unless you wish to type in passwords each time you do this.
Best way is to use ssh (part of OpenSSH). I do not know about Solaris 7 but I know you can get OpenSSH on Solaris 8 (though not supported by Sun). If the users are the same on both servers it is not too hard to do.
Failing that it would be via the use of .rhosts - not the bets way to do anything and usign the rsh (or remsh) command.
Comments on this post
stdunbar agrees!
__________________
According to Sod's Law, buttered toast lands butter side down, when dropped.
Per nature, cats always land on their feet.
So, what happens when you strap buttered toast to the back of a cat and throw it out a window?
.

Reply With Quote
  #3  
Old July 24th, 2006, 10:15 AM
stdunbar stdunbar is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: May 2004
Location: Superior, CO, USA
Posts: 1,728 stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 22 h 41 m 16 sec
Reputation Power: 354
Send a message via ICQ to stdunbar Send a message via Yahoo to stdunbar
I agree 100% with Ehlanna on the rsh front. I'd like to add my caution too. If this is a strictly internal application on an internal network then you could just do an:

Code:
rsh remotemachine java -cp /blah/blah/blah your.package.YourClass


assuming that paths and the like were set up correctly. As Ehlanna mentioned you may want to set up ~/.rhosts so that the password is not required.

But, again, this is a pretty dangerous configuration. For all practical purposes you're turning security off.

I don't know enough about your code but it seems like if you're stuck with an ancient O/S for production then it may make more sense to rethink your design a bit. Solaris 2.6 isn't supported under 1.4 either so you must be using 1.3. 1.3 has entered Sun's EOL meaning that when Mustang (1.6/6.0) is released 1.3 will no longer be supported without a support contract.

The environment you have is creating dangerous security practices because of it's age. I realize you very well may not make the O/S revision decision but that choice is quickly becoming obsolete. You're 4 major O/S releases behind. The problems you're trying to solve are all tied to this ancient O/S. Is there any way to convince the powers that (at least think they) be that it is time to move into the new millennium? Solaris 2.6 was released 9 years ago this month!
__________________
Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums.

Reply With Quote
  #4  
Old July 25th, 2006, 03:22 AM
million1977 million1977 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Aberdeen, Scotland
Posts: 48 million1977 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 3 sec
Reputation Power: 5
Thanks for your replies guys- they're really useful.

There is a plan to upgrade the server, but this won't happen til January at earliest; the java needs to go live in September.

Thanks once again

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Running shell script on different server


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway