LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Passwordless SSH problem? (https://www.linuxquestions.org/questions/linux-software-2/passwordless-ssh-problem-330161/)

LQYY 06-03-2005 11:24 PM

Passwordless SSH problem?
 
Dear masters,

Let me state my problem:
I have a 5-node PC cluster, all running Gentoo Linux 2005.0.
On the master node, the /home and /opt directories are
exported as NFS, which are mounted on the /home and /opt
directories of the four slave nodes, respectively.

I created several normal users with their home directories
located in /home on the master node, so that it can be
seen on all other nodes. Then, I did the following for each user
to setup passwordless ssh:
1. ssh-keygen -t rsa (withour setting the passphrase)
2. cd ~/.ssh
3. cp .id_rsa.pub authorized_keys2
To this point, everything is ok. I can get passwordless ssh
for all these users.

Then I created a special user, whose home directory is in /opt.
After I did the same thing as above, the passwordless ssh
doesn't work. I see "Connection closed by 192.168.1.101"
when I tried to ssh this machine. I checked the log file on
192.168.1.101. There is no record for this connection.

After I remove the authorized_keys2 file in .ssh, I can log in
this machine by providing a password.

Hope I state my problem clearly. Any comments are greatly appreciated.

YY

Linux.tar.gz 06-04-2005 05:01 PM

Perhaps your special user isn't allowed to run ssh.

LQYY 06-05-2005 11:22 AM

But I can ssh to the slave nodes if I delete the publice key file....

MasterC 06-05-2005 11:26 AM

Is the export file given the same options, and fstab mounting them with the same options?

If you:
ls -ld
your /home and /opt directories, both on the server and on the NFS mounted points, do you get the same permissions?

Cool

LQYY 06-05-2005 09:09 PM

Thanks for your reply. Below is content of /etc/exports.
/opt 192.168.1.0/255.255.255.0(async,no_subtree_check,rw)
/home 192.168.1.0/255.255.255.0(async,no_subtree_check,rw)

"ls -ld" shows the same permission for /home and /opt.

Below is the output from "ssh -v node-1", seems no error message.

OpenSSH_3.9p1, OpenSSL 0.9.7e 25 Oct 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to node-1 [192.168.1.101] port 22.
debug1: Connection established.
debug1: identity file /opt/tccmp/.ssh/identity type -1
debug1: identity file /opt/tccmp/.ssh/id_rsa type 1
debug1: identity file /opt/tccmp/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_3.9p1
debug1: match: OpenSSH_3.9p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.9p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'node-1' is known and matches the RSA host key.
debug1: Found key in /opt/tccmp/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /opt/tccmp/.ssh/identity
debug1: Offering public key: /opt/tccmp/.ssh/id_rsa
Connection closed by 192.168.1.101

ps115763 06-09-2005 09:56 PM

passwordless ssh login
 
I am trying to ssh from a windows system to MAC. What do I need to do so that I can ssh from windows to MAC without entering the user's password.


All times are GMT -5. The time now is 01:48 AM.