Remsh command


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Remsh command
# 1  
Old 08-09-2011
Bug Remsh command

Hi

Can any 1 tell me how to use REMSH command with example
actually i wanted to run the following command on different severs thru script "df -k .| tail -1 | tr -s ' ' ' ' | cut -d ' ' -f5" Smilie

please reply ASAP.Smilie
# 2  
Old 08-10-2011
remsh/rexec/rsh are depreciated these days, being featured in old hacker Nova episodes, in favor of ssh2 or atleast ssh. For the former, you need remote ~/.rhost files with correct permissions and entries (never use *) to say you at here is trusted by him at there. For ssh, this is done with proper permissions, keys and trust entries in the .ssh* dir. With passwordless remote access, you just run your command as "ssh2 user_there@host_there command args". Of course, if you need environment like $PATH beyond the default, you need to do remote commands to set that. You can make remote scripts or pipe a script to "ssh2 user_there@host_there your_shell". The ssh session does not have a tty, so some commands do not work without extended ssh options. See the ssh man page.
This User Gave Thanks to DGPickett For This Post:
# 3  
Old 08-15-2011
Quote:
Originally Posted by DGPickett
remsh/rexec/rsh are depreciated these days, being featured in old hacker Nova episodes, in favor of ssh2 or atleast ssh. For the former, you need remote ~/.rhost files with correct permissions and entries (never use *) to say you at here is trusted by him at there. For ssh, this is done with proper permissions, keys and trust entries in the .ssh* dir. With passwordless remote access, you just run your command as "ssh2 user_there@host_there command args". Of course, if you need environment like $PATH beyond the default, you need to do remote commands to set that. You can make remote scripts or pipe a script to "ssh2 user_there@host_there your_shell". The ssh session does not have a tty, so some commands do not work without extended ssh options. See the ssh man page.





Hey m still unable to login to remote machine is there smethingelse i shud try
i tried rhosts but its working as wellSmilie

can u tell me abt rhost entries
Smilie
# 4  
Old 09-01-2011
~/.rhosts must have the right permissions (644), and must contain 'host id' lines, where host can be an IP or barefoot or fully qualified host name, and it needs to be the right host name! Even then, admin settings can block some or all hosts. https://www.unix.com/man-page/OpenSolaris/0/rlogin/
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remsh

Hello All, I am on HP-UX. Problem is that my remote script behaves different depending on execution method. Method1 (Remote execution): remsh remoteserver /home/myscript.sh Method2 (Local execution): remoteserver :/home#sh myscript.sh In method 2, I can succesfully set timestamp with... (6 Replies)
Discussion started by: mrcrowley
6 Replies

2. Shell Programming and Scripting

remsh problem !

hi all , i am using remsh utility from a host to another , i did create an .rhosts in it the name of the second server and the user to use in it , then i changed permission to 600 .. it is still asking for password and i am using this for no password between 2 trusted servers we got also this... (3 Replies)
Discussion started by: semaan
3 Replies

3. HP-UX

[Solved] remsh command on hp-ux

hello, i have 4 hp-ux servers (srv1,srv2,srv3,srv4) srv1 is used to remsh srv2,srv3,srv4 /etc/hosts is configured on all servers and they can ping each other by ip,hostname and alies in srv2,srv3,srv4, .rhosts file is configured in user home with the entry: srv1 srv1_user ... (7 Replies)
Discussion started by: neemoze
7 Replies

4. Shell Programming and Scripting

Remsh

Hi All, Im using remsh to execute shell script on remote server. And this script gets called from another AIX server. My code is: remsh $rHost -l $rUser -n "export JAVA_HOME=/usr/java6_64_SR7; export ORACLE_HOME=/oravl01/oracle/11.1.0.7; export... (3 Replies)
Discussion started by: AB10
3 Replies

5. UNIX for Advanced & Expert Users

How To Grep Via REMSH

Well I didn't think this would be so complicated when I started it but, well, here we are. :( I'm trying to REMSH to other servers and run a grep command. Now this works just fine until the item I'm grepping for has whitespaces in it and then UNIX gets stubborn. Normally one would grep for a... (1 Reply)
Discussion started by: Korn0474
1 Replies

6. HP-UX

HPUX + remsh

Hi, I can remsh from a HPUX to a UNIX however my function keys dont then work as they should ! Any suggestions ? - have tried creating .kshrc Thanks (2 Replies)
Discussion started by: belfastbelle
2 Replies

7. Shell Programming and Scripting

remsh variables

Hi, I have script. #!/bin/sh -x CD=masterservice remsh 132.196.133.185 -l root './export $CD > test.output' rcp root@132.196.133.185:test.output But I receive the following error. + remsh 132.196.133.185 -l root ./export $CD > test.output To make it work, I remove the ' signs.... (1 Reply)
Discussion started by: mr_andrew
1 Replies

8. UNIX for Advanced & Expert Users

remsh problem

Hi All, We have 2 unix boxes HP UX. From Box1 we need to run a script on Box2 using remsh. The job at Box2 exits with status 0 on successful completion & 1 if fails. But even if the scrips fails (exits with return status 1) at Box2, the $? get the value 0. script at Box2 : remote_script.sh... (2 Replies)
Discussion started by: sabyasm
2 Replies

9. UNIX for Dummies Questions & Answers

remsh

i m try to do remsh i need to know what are the step to define the user and password i try .rhosts it give me operator:/export/home/operator>remsh billmed ps -ef permission denied just for testing (3 Replies)
Discussion started by: kazanoova2
3 Replies

10. UNIX for Dummies Questions & Answers

remsh question

Is there a way to execute more than one command on a remote server using remsh? (2 Replies)
Discussion started by: aaareyes
2 Replies
Login or Register to Ask a Question