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" :slight_smile:

please reply ASAP.:slight_smile:

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.

1 Like

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

can u tell me abt rhost entries
:slight_smile:

~/.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. http://www.unix.com/man-page/OpenSolaris/0/rlogin/