- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: loop through the accounts and servers
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
Discussions
Discussions
Forums
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
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
тАО01-14-2009 09:40 AM
тАО01-14-2009 09:40 AM
Re: loop through the accounts and servers
if [[ ${Account} = "tuxbug" ]] || [[ ${Account} = "tuxapi" ]]
is working thanks anyway
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2009 01:54 PM
тАО01-14-2009 01:54 PM
Re: loop through the accounts and servers
Why special case the current machine? You can remsh to it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2009 02:08 PM
тАО01-14-2009 02:08 PM
Re: loop through the accounts and servers
list1
act1 server1
act2 server1
act3 server3
act4 server3
act5 server4
if im running the script from the server1 then can i use remsh here for act1 and act2? I thought I cant thats why first I tried to use if to select the accounts that are in the server1 and for rest of the account use remsh.
Im doing gud? I know this way its working but If I can run the script on local or remote server using remsh then I dont need to use that extra if statement to check the accounts in current server.
Because remsh will have
remsh servername -l actname -n scripts
if i run this from the local server it will be like im trying to connect server 1 from server 1. thats what I thought. Is there any other way ?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2009 02:11 PM
тАО01-14-2009 02:11 PM
Re: loop through the accounts and servers
> its not working but ... is working thanks anyway
How is what I suggested not working based on what you have asked? I think you are making this more difficult than it is.
As noted, if you don't have or won't configure and use 'ssh' use 'remsh'. As noted, you can 'remsh' to yourself the server on which the process is running). It's an easy simplification of logic and enables your script to be initiated on any of your servers and 'remsh' or 'ssh' to the remaining ones.
Regards!
...JRF...
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2009 02:21 PM
тАО01-14-2009 02:21 PM
Re: loop through the accounts and servers
if [ ${Account} = "account1" -o ${Account} = "account5" ]; then
is not working and
if [[ ${Account} = "tuxbug" ]] || [[ ${Account} = "tuxapi" ]]
this is working
About Remsh, I tried to run remsh from
server1 to server1 to execute some commands and it says login incorrect.
remsh server1 -l user1 -n ~/scripts/stop
remshd: Login incorrect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2009 02:23 PM
тАО01-14-2009 02:23 PM
Re: loop through the accounts and servers
Yes, that's what it does. It works, why try to optimize it?
>JRF: enables your script to be initiated on any of your servers and 'remsh' or 'ssh' to the remaining ones.
Of course you could compare to $(hostname) so the script doesn't hardcode accounts or servers. :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2009 03:28 PM
тАО01-14-2009 03:28 PM
Re: loop through the accounts and servers
> Dennis: Of course you could compare to $(hostname) so the script doesn't hardcode accounts or servers.
Obviously that is another option.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 09:19 AM
тАО01-19-2009 09:19 AM
Re: loop through the accounts and servers
Is there any way we can do that by using
rlogin but should work similar way as remsh or ssh. I know it will prompot for password but I was thinking if we can pass some file from command line as a parameter or something like that whatever works.
Just like in ftp that we can save user name and password in .netrc file in home directory. and just
ftp ftp.yourdomain.com
will work
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 09:53 AM
тАО01-19-2009 09:53 AM
Re: loop through the accounts and servers
rlogin but should work similar way as remsh or ssh"
ssh was suggested as its' more secure, and w/ the keys properly setup, its not going to require a password.
rlogin is just that, a login session on a remote host.
remsh will do what you need, as you specified it. I take it you now have a problem with that solution as well????
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 04:19 PM
тАО01-19-2009 04:19 PM
Re: loop through the accounts and servers
Why? The purpose of rlogin is to login and for remsh to execute a command.
>Just like in ftp that we can save user name and password in .netrc file in home directory
Both r* commands use ~/.rhosts so you don't need a password.
- « Previous
-
- 1
- 2
- Next »