Help with rsh problem

Hi all, just after a bit of help..

I am attempting to read in the contents of a flat text file from one system to another using 'rsh', i have this setup over around 15 machines and it works for them all except one. On this one machine it just reads in a blank line for some reason. The machine details are AIX 7.1 on the host machine and AIX 5.3 on the target. I am using the simple command - rsh (machine) cat (targetfile).

Now this just comes back with a blank output for some reason, however if i manually rsh over and then run the cat it works fine..

any ideas ??

I assume you verified rsh works, testing with "rsh machine date" or similar.

Is targetfile an absolute or relative path? If relative path, that would probably account for failure.

Are you 100% sure you entered the absolute path correctly?

Hi, the (targetfile) bit was just an example, yes i do have the absolute path. I tested the rsh with a simple date command and that too brings nothing back, yet i can rsh over to the system with no problems and then run the commands it's just attempting to run them remotely which is the problem.

I would try rsh machine /bin/date (at least it's in my bin directory) to see if something with PATH.

no still nothing, just returns no output at all, no errors or anything..

Maybe you already tried the -v or -vv etc. options to see if it tells you what the problem is?

There are not enough data to say for sure but my "gut-feeling" points to a privilege-problem somehow. What does "lsuser" say about the user account on the target machine involved? Maybe it is restricted in some weird way so that "login" is allowed but remote execution is not.

I hope this helps.

bakunin

I've just checked with the lsuser command and cannot see any obvious restrictions on the account.

Did -v etc. say anything useful?

where would i put the -v ?

---------- Post updated at 12:43 PM ---------- Previous update was at 12:36 PM ----------

managed to get an error now - protocol failure due to unexpected closure from server end

rsh -v machine /bin/date
rsh -vv machine /bin/date
rsh -vvv machine /bin/date

That's assuming your version of rsh supports -v option.

From man page: -v Verbose mode. Causes ssh to print debugging messages about its progress. This is helpful in debugging connection, authentication, and configuration problems. Multiple -v options increase the verbosity. The maximum is 3.

we are running rsh not ssh, the -v flag does not work with rsh

That was my concern, that your rsh version did not have that flag.

$ rsh -V
OpenSSH_6.0p1 Debian-3ubuntu1, OpenSSL 1.0.1c 10 May 2012
$ rsh -v 192.168.02 date
OpenSSH_6.0p1 Debian-3ubuntu1, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.02 [192.168.0.2] port 22.
......... Many lines of diagnostic information
Transferred: sent 2712, received 2272 bytes, in 0.2 seconds
Bytes per second: sent 11340.8, received 9500.9
debug1: Exit status 0

It seems very useful. Maybe your rsh has some debugging option? I have no idea.

Hi, the best i can get out of it is -

'protocol failure due to unexpected closure from server end'

We are poking around in the dark. I suggest you do not tell us what you see but show us what you see. We cannot look directly at your system and obviously something escaped your attention, otherwise it would work. So show us and maybe it won't escape our recognition. What i mean is: post dumps of the relevant configuration files, the actual commands you tried, the mentioned lsuser output, etc., instead of telling us you can't see anything wrong.

There is a saying, "all scientists are from Missouri". One of their Congressmen, Mr. Vandiver, in 1899 hold a speech at a naval banquet, where he said: "I come from a state that raises corn and cotton and cockleburs and Democrats, and frothy eloquence neither convinces nor satisfies me. I am from Missouri. You have got to show me."

So, please: show us.

I hope this helps.

bakunin

When you say you can "rsh" to the machine, and then do things, we are assuming that you are getting a shell. Is that what you mean to say as well?

i.e., instead of doing $ rsh machine date or you simply using $ rsh machine ?

Additional question: is is not working from all systems, or only from one? I am thinking that there may be a problem with the contents of ~/.ssh/known_hosts

Ahem, this is the AIX forum. It is fair to assume that the thread-o/p uses the AIX-variants of all the commands involved.

bakunin

I was just suggesting the poster run a diagnostic option. They eventually did.

So, I guess we need the same from the AIX ssh version he is using. The client "should not" matter. Famous last words, perhaps?

I haven't used the r-commands for a long time, but last time i checked "rsh" was a program of its own and not some alias for "ssh". This might be different in other *nix-flavours (including the Linux distro hanson44 seems to be using) but in AIX "rsh" will execute /usr/bin/rsh , which is an executable with the expectable function.

Among the things worth posting would be the hosts.equiv files and the relevant parts of their contents too. It would also help to know if there is a Kerberos-domain set up or not (and if there is, how it is configured, of course), because "rsh" can be run Kerberos-aware too.

I hope this helps.

bakunin