Help: How to use RSH to login machines without password?

Discussion in 'Linux Networking' started by Amy Lee, Sep 15, 2007.

  1. Amy Lee

    Amy Lee Guest

    Hi,

    I have 4 PCs in LAN, IP are 192.168.0.1~192.168.0.4, and the first machine
    is server, so I wanna use rsh to login other 3 machines. Nut I don't wanna
    type password every time.

    My server's OS is RHEL 3 Linux, others' is FC6.
    Which files and service should I operate?

    Thank you very much~

    Regards,

    Amy Lee
     
    Amy Lee, Sep 15, 2007
    #1
    1. Advertisements

  2. Use ssh and login using Public Key Authentication (so your computer
    shares a secret with the other machines that it wants to log into).

    "man ssh" tells you how.

    Robert
     
    Robert Harris, Sep 15, 2007
    #2
    1. Advertisements

  3. Amy Lee

    Amy Lee Guest

    Thank you sir. However, I've known how to configurate ssh without
    password, I wanna know the same function in rsh.
     
    Amy Lee, Sep 15, 2007
    #3
  4. Ah. Well, on my computer, rsh is a symlink to ssh and if you configure
    one, then you also configure the other. However, if you want to use the
    traditional rsh with the traditional insecure method of logging in, then
    create a file called ".rhosts" in your home directory of each of the
    machines that you want to log into containing the line:

    yourusername yourhostname

    where yourusername and yourhostname are replaced by your user name and
    host name respectively. Check with rlogin that you can log into your
    other hosts without a password.

    Robert
     
    Robert Harris, Sep 15, 2007
    #4
  5. Doing this with rsh isn't a recommended practice.
    If you have to do it, .rhosts is preferable to hosts.equiv.
     
    Allen Kistler, Sep 15, 2007
    #5
  6. Amy Lee

    Chris Davies Guest

    I think you'll find it should be the other way round (remote-host
    remote-user).

    Also, another gotcha is that the remote-host part must be an exact match
    for the name (or IP address) that the target host sees the originating
    host as. If you don't use /etc/hosts or DNS, now would be a good time
    to start.

    # This is /etc/hosts
    127.0.0.1 localhost loopback
    192.168.0.1 somehost.my.domain somehost
    192.168.0.2 anotherhost.my.domain anotherhost
    etc.

    Chris
     
    Chris Davies, Sep 18, 2007
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.