Re: ssh setup

Peter Cordes <[email protected]>
Newsgroups gmane.linux.cluster.openmosix.general
Message-ID <[email protected]>
On Fri, Mar 10, 2006 at 04:49:47PM -0800, Andres De Carlo wrote:
>  
> Thanks in advance. I have been trying to set up a cluster and I have been
> having problems setting up the ssh and I have followed all the documentation
> in openmosixview+ssh page  and the short way still doesn't work and the long
> way either. I have followed perfectly the instructions and nothing still was
> getting prompt for the password and not the passphrase. I have modify the
> files like it said in the documentation and nothing, I have installed fedora
> core 1 and the version of rsh that comes with it. I have also read the ssh
> config page from http://www-128.ibm.com/developerworks/library/l-keyc.html
> Daniel Robins and I wasn't able to make it work either, like the way he
> explains in the site, any ideas if could be my version of ssh that I have
> installed or other trick that I might be missing. 
>  
> I am able to connect like this in the terminal # ssh 192.168.1.110 because
> it doesn't recognized the name of the computer like root@node6 or node6
> error ssh: node6 : name or service unknown.

 The quickest and easiest (in the short term) solution to that would be to
set up an /etc/hosts file.  e.g. mine looks somewhat like:
127.0.0.1       localhost.localdomain   localhost

10.0.0.1        mycluster mycluster.domain.name
10.0.0.2        mycluster2
10.0.0.3        mycluster3
10.0.0.4        mycluster4
10.0.0.5        mycluster5

10.0.0.100      dlink-switch


> But anyways if I enter the node
> that I am trying to connect Ip address works and prompt me for the password
> no for the passphrase, and if I type the phassphrase that I used when I
> generate the key I got permission denied so if I input my root password I am
> able to connect ssh to the node.

 You should try using ssh-copy-id.  It has a man page that says a lot of
what I'm about to say.

 If ssh wants the passphrase for you private key, it will ask for it like
this:

llama]~$ ssh mycluster
Enter passphrase for key '/home/peter/.ssh/id_rsa':
peter@mycluster... password: 

 I have a key with a passphrase, and to make this example I didn't put it in
(I just pressed return).  Then ssh falls back to password-authentication (or
keyboard-interactive-authentication (PAM stuff you don't need worry about)).
You are _not_ going to succeed by typing your key's passphrase when ssh asks
you for a key.

 SSH will only ask you for the passphrase if you will be able to log in
using the key.  i.e. your _public_ key has to be appended to
~/.ssh/authorized_keys on the remote machine.  (~ will be /root in your
case).  ~/.ssh must not be group writeable (depending on sshd_config
settings).

 To debug ssh problems, try running ssh with -v for verbose output.  Also
you can turn on verbose logging in the server, which is often the most
useful thing to do.  Remember to turn it off once you get it working, esp.
if you enable logging sensitive information (like the username the client
sent, in case the user types their password when they were prompted for
username).

 If you want a passphrase on your keys but still want passwordless logins,
use ssh-agent.  I have the graphical version of ssh-add in my x session
startup stuff on my desktop machine at work.  (Debian configures things so
ssh-agent is the parent process of the whole X session, so the window
manager and therefore everything you start from it inherits SSH_AUTH_SOCK,
so all your xterms use your ssh agent and you don't have to type your
passphrase or password to get into your clusters.)

 Within my cluster, I have passwordless ssh between the root accounts on the
cluster nodes.  (That's only on the cluster that doesn't netboot CHAOS
ramdisks on all but the head node.  It was only five nodes, and I manually
installed Debian on all of them, and manually set up the mesh of ssh keys
and authorized_keys for all of them.)

 Anyway, if you're still stuck, read the man page for ssh-copy-id.

-- 
#define X(x,y) x##y
Peter Cordes ;  e-mail: X(peter@cor , des.ca)

"The gods confound the man who first found out how to distinguish the hours!
 Confound him, too, who in this place set up a sundial, to cut and hack
 my day so wretchedly into small pieces!" -- Plautus, 200 BC


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.