- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Need Shell Script Help
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2005 07:49 AM
03-05-2005 07:49 AM
Need Shell Script Help
I need some Shell Script Help. I want to have a shell script on one m/c, whose contents will be as follows:
# -- M/c1 scripts
./
./
rlogin M/c2
./
./PATH_NAME>/test1.sh
exit
-- Comback to M/c1 and execute some more scripts
When I am trying to execute a test scripts, It comes till rlogin m/c2. But stays at the prompt. does not proceed to the next setup commands.
Am I missing something?
Please help me in writing a shell script and finding some good site about learning Shell Scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2005 08:00 AM
03-05-2005 08:00 AM
Re: Need Shell Script Help
I believe you need remsh or if you have ssh use ssh.
If I understood you right, on the remote box you must create .rhosts file in the user home directory and write there the ip and the user that can execute the commands, then you can use remsh without getting adked about password.
For example, you have two hosts:
111.111.111.111
111.111.111.222
you want user alex to execute scripts on the remote box with user danny.
Login into remote box and in the home directory of danny create file .rhosts and put in it:
111.111.111.111 alex
Now on 111.111.111.111 you can do:
remsh -l danny 111.111.111.222 "ls -l /tmp"
(usage: remsh -l
For more details you can man remsh.
But I suggest to use ssh. Easier and secure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2005 10:10 AM
03-05-2005 10:10 AM
Re: Need Shell Script Help
Install keys for ssh on node 2 and 3 the client servers :-)
host1 (master script host):
#!/usr/bin/ksh
scp ./
scp ./
ssh user@host2 -c "./
ssh user@host3 -c "./
ssh user@host2 -c "rm ./
ssh user@host3 -c "rm ./
You could put the commands together with a ';' as sepperation, but for the ex. this is better.
Hope it helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2005 12:19 PM
03-05-2005 12:19 PM
Re: Need Shell Script Help
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2005 12:20 AM
03-06-2005 12:20 AM
Re: Need Shell Script Help
Thanks for Your Reply. I tried using the following Command and get the following error.
ssh applmgr@bdfdb2 -c '. /oracle/FAHRIS/fahrisora/8.0.6/FAHRIS_bdfdb2.env'
Error:
Unknown cipher type '. /oracle/FAHRIS/fahrisora/8.0.6/FAHRIS_bdfdb2.env'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2005 12:47 AM
03-06-2005 12:47 AM
Re: Need Shell Script Help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2005 12:51 AM
03-06-2005 12:51 AM
Re: Need Shell Script Help
Both My hosts are HP Unix (11.11). I did nt copy authorized_keys . Can you ple guide me how to do that ?
Thanks & regards
Ashok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2005 01:00 AM
03-06-2005 01:00 AM
Re: Need Shell Script Help
http://www.cvrti.utah.edu/~dustman/no-more-pw-ssh/
I can't explain it better :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2005 09:10 PM
03-06-2005 09:10 PM
Re: Need Shell Script Help
I need some Shell Script Help. I want to have a shell script on one m/c, whose contents will be as follows:
# -- M/c1 scripts
./
./
remsh M/c2 "./
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2005 09:23 PM
03-06-2005 09:23 PM
Re: Need Shell Script Help
www.shelldorado.com
read and learn
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2005 09:27 PM
03-06-2005 09:27 PM
Re: Need Shell Script Help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2005 10:43 PM
03-06-2005 10:43 PM
Re: Need Shell Script Help
Its working Now. I used remsh and able to run the script. Thansk for your help.
Thanks To Alex Also for his cooperation.
regds
Ashok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2005 12:19 AM
03-07-2005 12:19 AM
Re: Need Shell Script Help
Can you assign few points, for all of us.
Thanks
Olivier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2005 08:02 AM
03-11-2005 08:02 AM
Re: Need Shell Script Help
I will be glad to assign Points. But where and how to assign points ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2005 10:06 AM
03-11-2005 10:06 AM
Re: Need Shell Script Help
That's all :)