- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- doing some commands on a remote machine
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
02-01-2005 10:10 PM
02-01-2005 10:10 PM
doing some commands on a remote machine
i got 2 machine machine x and y, i need to issue a command on machine x from machine y, then copy the result from machine x resulted from this command to machine y in a specific directory
can someone tell me how to do it,
thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2005 10:18 PM
02-01-2005 10:18 PM
Re: doing some commands on a remote machine
check the man pages for rexec, rlogin, rsh etc. One of these should be the right for you. And make sure, that the access from system to system is configured properly.
Rgds
Alexander M. Ermes
- Tags:
- remsh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2005 10:20 PM
02-01-2005 10:20 PM
Re: doing some commands on a remote machine
i read the remsh and the rcp but i couldnt go on and do it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2005 11:19 PM
02-01-2005 11:19 PM
Re: doing some commands on a remote machine
Have you created the .rhosts in the users directory perms rwx------ ?
with for box X: Y
Y: X
I just just did on 2 trusted hpux11 box to see:
alnitak # id
uid=200(vbe) gid=2(bin)
alnitak # remsh alnitam -n "date"
Wed Feb 2 13:10:37 MET 2005
alnitak # remsh alnitam -n "date>today.test"
alnitak # rcp alnitam:/home/vbe/today.test .
alnitak # ll
total 4
-rwxr-xr-x 1 vbe bin 146 Nov 28 2000 myping
-rw------- 1 vbe bin 29 Feb 2 13:13 today.test
alnitak #
What are you trying to do?
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2005 11:23 PM
02-01-2005 11:23 PM
Re: doing some commands on a remote machine
so i need to be able to issue from machine Y the backup command on Y, then copy the result from machine X to machine Y
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2005 11:38 PM
02-01-2005 11:38 PM
Re: doing some commands on a remote machine
Box Y:
tar -cf -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2005 11:43 PM
02-01-2005 11:43 PM
Re: doing some commands on a remote machine
easy on me i am not that good in HPUX OK :) that is why i am asking
i got from the line you wrote that
system will go do a tar on box X for the backup directory and then it will be piped so it will be untared in the box Y
is that correct ???
and what is the difference between this and my idea, cuz in my idea i wanted to copy the whole files and directory strcutre that will result from the backup script ???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2005 11:57 PM
02-01-2005 11:57 PM
Re: doing some commands on a remote machine
The other way round you archive Y and extract on X...
The difference? Mainly the space for the archive you have to spare on both boxes with your solution...
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2005 12:26 AM
02-02-2005 12:26 AM
Re: doing some commands on a remote machine
Have you tried my little test just to see you can remote command...
Because I was wondering if you have some configuration not allowing... have a look at the inetd configuration, look at /etc/inetd.conf
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2005 12:35 AM
02-02-2005 12:35 AM
Re: doing some commands on a remote machine
yes i did try the remsh and the rcp and they are working
i need to put the logic togther now to get it done
i am not sure why i am unable to do it may be that is why i need the help
as i told you, i am trying to make backup on machine X from machine Y, then copy the result of the backup to machine Y
i do have the space on both machines so this is not a worry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2005 12:44 AM
02-02-2005 12:44 AM
Re: doing some commands on a remote machine
Kind regards
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2005 12:56 AM
02-02-2005 12:56 AM
Re: doing some commands on a remote machine
Assuming you want to copy a directory subtree from Machine Y to Machine X. here is what I will do
1) At machine X
a) Create /.rhosts file and add 2 lines
2) At Machine Y, repeat the step (1.a)
3) login as root from Machine Y
4) try rlogin
This should log you in to Machine X without password.
5) From Machine X try
rlogin
Again login should happen without password.
6) Now You must be in Machine Y. Assuming you want to copy /tmp/your_dir
# rcp -r /tmp/your_dir
7) check at your Machine X if you got the files. if so, you can proceed.
If not, write back with the problem you encountered.
With regards,
Mohan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2005 01:06 AM
02-02-2005 01:06 AM
Re: doing some commands on a remote machine
to copy from the remote machine to the local machine
which means
assuming i am in Machine Y
i wanna copy while i am in machine Y to machine X
so is that possible ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2005 12:11 AM
02-03-2005 12:11 AM
Re: doing some commands on a remote machine
I think the easiest way to do what you want (as I understand it) would be to write a script
that sits on machinex and execute it from machiney via remsh.
e.g.
#!/bin/ksh
# A simple backup script
cd /wherever
tar cf whatever.tar *
gzip whatever.tar
rcp whatever.tar.gz machiney:/mydir/
Then execute it from machiney:
remsh machinex /yourdir/backup.ksh
The above script will require .rhosts entries on both machines. e.g.
on machinex:
machiney root
on machiney:
machinex root
If you don't want .rhosts files all over the place, remove the last line of the script, then
you can do it all from machiney:
remsh machinex /yourdir/backup.ksh;rcp machinex:/wherever/whatever.tar.gz /mydir/
Hope that helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2005 09:36 AM
02-03-2005 09:36 AM
Re: doing some commands on a remote machine
Yes, the reverse is possible.
From Machine Y,
1) Login as root
2) rcp -r
is this what you want to do? Give a thought about the script suggested by Morrison.
Also you should read the man pages of rcp to understand clearly if it provides what you are looking for.
Hope this helps.
With regards,
Mohan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2005 11:36 PM
02-06-2005 11:36 PM
Re: doing some commands on a remote machine
But be aware that using remsh or rexec is not secure. Some systems are not allowing this kind of remote execution.
Regards,
Bob
Ps. My 0.02 euro.