Fedora This forum is for the discussion of the Fedora Project. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-20-2005, 04:05 PM
|
#1
|
Member
Registered: Nov 2004
Location: Edinburgh, UK
Distribution: Fedora Core 3
Posts: 188
Rep:
|
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.
|
|
|
06-20-2005, 04:12 PM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
/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.
|
|
|
06-20-2005, 06:13 PM
|
#3
|
Member
Registered: Nov 2004
Location: Edinburgh, UK
Distribution: Fedora Core 3
Posts: 188
Original Poster
Rep:
|
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
|
|
|
06-21-2005, 02:28 AM
|
#4
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
You can normally just create a blank on. just check its manpage for details.
|
|
|
06-21-2005, 06:28 PM
|
#5
|
Member
Registered: Nov 2004
Location: Edinburgh, UK
Distribution: Fedora Core 3
Posts: 188
Original Poster
Rep:
|
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?
|
|
|
06-22-2005, 03:12 AM
|
#6
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
06-22-2005, 09:45 AM
|
#7
|
Member
Registered: Mar 2004
Distribution: Fedora Core 3, Arch Linux 0.7
Posts: 57
Rep:
|
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.
|
|
|
08-03-2005, 05:37 AM
|
#8
|
Member
Registered: Nov 2004
Location: Edinburgh, UK
Distribution: Fedora Core 3
Posts: 188
Original Poster
Rep:
|
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.
|
|
|
04-26-2007, 02:04 AM
|
#9
|
LQ Newbie
Registered: Apr 2007
Posts: 5
Rep:
|
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.
|
|
|
04-26-2007, 03:16 AM
|
#10
|
Member
Registered: Nov 2004
Location: Edinburgh, UK
Distribution: Fedora Core 3
Posts: 188
Original Poster
Rep:
|
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.
|
|
|
04-26-2007, 05:29 AM
|
#11
|
LQ Newbie
Registered: Apr 2007
Posts: 5
Rep:
|
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.
|
|
|
04-26-2007, 06:46 AM
|
#12
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
well you have a different problem them... please don't drag up old threads. let this one die again, and start your own ehh?
|
|
|
All times are GMT -5. The time now is 03:13 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|