rsh and rshd
what is the difference between rsh client program and rshd server program? Do I need both packages installed in each system to run command on remote system via rsh? I have the first one system with rsh client installed. (/usr/bin/rsh), the second system has both rsh and rshd installed, (/usr/bin/rsh and /usr/sbin/in.rshd), both systems has "+ +" entry in both .rhosts and hosts.equiv files and "ALL : ALL : ALLOW" in hosts.allow file, but I still could not get rsh worked?? I tried (rsh -l login second-system "ls") from the first system, I got permission denied. I tried (rsh -l login first-system "ls") from the second system, I got connection refused.
Any suggestion? Thanks. |
You only need the daemon on the host(s) you want to log in to.. Did you make sure it's running.
You probably ought to just use SSH (with key authentication if you need passwordless) unless you have some real reason for wanting RSH (there are a couple, but not very common). |
When you said "daemon", do you imply "rshd"?
|
rshd is the daemon which listens for connections. rsh is the client. The process is works like this
1. you start the client rsh on the box you are working from. 2. The client then calls the server rshd on the remote box you wish to connect to 3. you enter the username and password for your account on the remote box NOT the local box you are currently using. 4. Authentication is completed and you are connected to a shell service (command line) on the remote box. |
But as btmiller already suggested: try to avoid the "r"tools,
and use ssh instead. ssh is way safer ;} Cheers, Tink |
SSH uses the same principles and the best way to go. It includes a much greater level of security by using encryption.
|
I am in the situation that I dont really care about the security, rsh was built in my testing environment that I can not change.
I installed rshd in the first system and tried "rsh localhost ls" and got "Permission denied", tried "rsh localhost" got connect to address 127.0.0.1: Connection refused Trying ::1.... and I did "rexec localhost ls" using "root" user, localhost: Connection refused rexec: Error in rexec system call, rexec: (The following system error my itself be in error) rexec: Illegal seek also I did "chkconfig | grep rsh", I got "rsh xinetd". I can ping and telnet from both systems. The /etc/xinetd.d/rsh looks like the follwing, service shell { socket_type = stream protocol = tcp wait = no user = root group = root server = /usr/sbin/tcpd server_args = /usr/sbin/in.rshd -aL flags = NAMEINARGS } I did "netstat -l --inet", there seems to have an entry tcp 0 0 *:shell *.* LISTEN Yast2 showed "shell" as the service instead of "rsh". Any suggestion? Thanks. |
The rshd is not running. try this
#ps ax | grep rshd if you get no output then the rshd is not running. You will need to start it. |
How do I start rshd then? I am running on SuSE 9 Linux. There was no service command? I typied "xinetd" but it did not seem to work?
Thanks |
Have a look in your /etc/services file and look rsh make sure it is set to start and not commented out.
|
You need to enable it in /etc/xinetd.d/rsh (and rlogin). Change the line "disable = yes" to "disable = no", and restart xinetd. You'll probably also have to add "rsh" and "rlogin" to /etc/securetty.
|
I dont have "disable" line in the file /etc/xinetd.d/rsh. I think rsh is enabled through xinetd. I can find /usr/sbin/xinetd is running from "ps" command, but I still kept getting "permission denied" error. I also included "rsh" in /etc/securetty. This is a very hard problem..... I gave up.
:confused: |
All times are GMT -5. The time now is 12:27 PM. |