LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-20-2005, 04:05 PM   #1
kevingpo
Member
 
Registered: Nov 2004
Location: Edinburgh, UK
Distribution: Fedora Core 3
Posts: 188

Rep: Reputation: 30
rsh / ssh woes


Does anyone know how to configure/setup rsh/rlogin and ssh so that they don't ask for a password?

Am using MPICH and it requires the use of rsh, or ssh as last resort.

Am using Fedora Core 3.
 
Old 06-20-2005, 04:12 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
/etc/hosts.equiv is probaly the file you want to be looking it, if it's got to be rsh etc... for ssh you can use that too, but naturally public key exchanges would be nicer.
 
Old 06-20-2005, 06:13 PM   #3
kevingpo
Member
 
Registered: Nov 2004
Location: Edinburgh, UK
Distribution: Fedora Core 3
Posts: 188

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by acid_kewpie
/etc/hosts.equiv is probaly the file you want to be looking it, if it's got to be rsh etc... for ssh you can use that too, but naturally public key exchanges would be nicer.
Erm, I don't have a /etc/hosts.equiv file. I do have a /etc/hosts.allow and hosts.deny files
 
Old 06-21-2005, 02:28 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
You can normally just create a blank on. just check its manpage for details.
 
Old 06-21-2005, 06:28 PM   #5
kevingpo
Member
 
Registered: Nov 2004
Location: Edinburgh, UK
Distribution: Fedora Core 3
Posts: 188

Original Poster
Rep: Reputation: 30
I manage to get rshd and rsh working. I can rsh to myself localhost but only as a normal user. I notice I cannot rsh as root. It seems as root account doesn't exist. Is it possible to configure/setup rshd so that it accepts root logins?
 
Old 06-22-2005, 03:12 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you really really really don't want to be doing that... there's always a better way. you'd be a lot better off using ssh for root stuff if you really have to.
 
Old 06-22-2005, 09:45 AM   #7
Pudge
Member
 
Registered: Mar 2004
Distribution: Fedora Core 3, Arch Linux 0.7
Posts: 57

Rep: Reputation: 15
Let's say you have two Fedora machines, one is named Valhala1 and the other is Valhalla2. Further, let's say you want to be able to ssh INTO Valhalla2 FROM Valhalla1 without using a password. The easiest way is to have the same users established in both machines, let's say a user named thor. Now that both machines have a user named thor, in Valhalla1, the machine you are going to connect from, login as thor. Then do the following as thor:
[thor@Vallhala1 ~]$ ssh-keygen -b 2048 -t rsa
when it asks where to put the files, use the default of /home/thor/.ssh
when it asks to enter a pass phrase, enter a null pass phrase by hitting enter twice
This command should generate a public and private key at 2048 bit keys (default is 1024 bit, but I highly recommend 2048) and places them in the files /home/thor/.ssh/id_rsa and /home/thor/.ssh/id_rsa.pub

now you need to copy the contents of thor@Valhalla1 /home/thor/.ssh/id_rsa.pub (the from machine) to thor@Valhalla2 /home/thor/.ssh/authorized_keys (the to machine). So, logged into Valhalla1 as thor,

[thor@Valhalla1 ~]$ /cd /home/thor/.ssh
[thor@Valhalla1 .ssh]$ scp id_rsa.pub thor@Valhalla2:/home/thor/.ssh/authorized_keys

you should now be able to ssh FROM thor@fedora1 TO thor@fedora2 without having to type in a password.

Now, let's further say you have a user named odin at Vallhala2. If you now copy the contents of thor@valhalla1 /home/thor/.ssh/id_rsa.pub to odin@valhalla2 /home/odin/.ssh/authorized_keys you could now be logged in as thor on valhalla1 and ssh into odin at valhalla2 as such:
[thor@Valhalla1 ~]$ ssh odin@vallhalla2
and not have to use a password. Likewise, if you copied thor@valhalla1 /home/thor/.ssh/id_rsa.pub to root@valhalla2 /root/.ssh/authorized_keys you would be able to ssh from thor@valhalla1 to root@valhalla2 as such
[thor@Valhalla1 ~]$ ssh root@vallhalla2
but I don't recommend this. It's better to ssh into a user on valhalla2 then use the su or su - or even sudo command to do things as root. However, if you are doing things at root on a remote machine using a script, you almost have to ssh in as root. Use with caution however.

Hope that helps

Pudge

Last edited by Pudge; 06-22-2005 at 09:49 AM.
 
Old 08-03-2005, 05:37 AM   #8
kevingpo
Member
 
Registered: Nov 2004
Location: Edinburgh, UK
Distribution: Fedora Core 3
Posts: 188

Original Poster
Rep: Reputation: 30
I just like to tell everybody that at last I found out why my rsh was using
Kerbos5 resulting in annoying messages (when am trying to get a clean passwordless rsh). As I analysed from the list:

Connection refused
Trying krb4
Connection refused
Trying normal

The first being a kerberos 5, then a version 4 try before finally a normal
being successful. I thought there must be more than one version of rsh installed. So I typed 'locate rsh'. I try the first on the list. I typed '/usr/bin/rsh localhost' and that worked fine. Then typed 'which rsh'. To my surprise it says '/usr/kerberos/bin/rsh'. I then
looked at my $PATH and see that that's the first folder that's being pathed. So I removed it. Problem solved.
 
Old 04-26-2007, 02:04 AM   #9
xear
LQ Newbie
 
Registered: Apr 2007
Posts: 5

Rep: Reputation: 0
I am setting up a cluster to be used for PVM, however, i cannot rsh the networked computer but i can ssh the computer just fine. Anybody who knows how to solve this problem would be of much help to me. I have already inputed all the necessary info in the .rhosts. Thanks.

Last edited by xear; 04-26-2007 at 02:06 AM.
 
Old 04-26-2007, 03:16 AM   #10
kevingpo
Member
 
Registered: Nov 2004
Location: Edinburgh, UK
Distribution: Fedora Core 3
Posts: 188

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by xear
I am setting up a cluster to be used for PVM, however, i cannot rsh the networked computer but i can ssh the computer just fine. Anybody who knows how to solve this problem would be of much help to me. I have already inputed all the necessary info in the .rhosts. Thanks.
You should read the post just before yours. It solves your problem.... 5 years ago.
 
Old 04-26-2007, 05:29 AM   #11
xear
LQ Newbie
 
Registered: Apr 2007
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by kevingpo
You should read the post just before yours. It solves your problem.... 5 years ago.
Thanks for your info, i've done that already, unfortunately its always still giving me a message "No route to host". i'm using red hat linux enterprise edition.
 
Old 04-26-2007, 06:46 AM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you have a different problem them... please don't drag up old threads. let this one die again, and start your own ehh?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to setup rsh or configure ssh properly cheeku Linux - Software 5 03-30-2006 07:47 AM
RSH: remuser too long error when rsh is executed from IIS dev33445 Programming 0 08-29-2005 09:34 AM
what is rsh and ssh ztdep Linux - Networking 2 07-17-2005 05:28 AM
rsh/ssh from Linux to Solaris sttaft Solaris / OpenSolaris 7 06-16-2004 06:14 AM
No password needed for ssh or rsh wanted. syrtsardo Linux - Networking 6 11-04-2003 09:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration