PDA

View Full Version : 9.10 SSH without password (id_rsa) not working



littlechild
April 29th, 2010, 02:12 AM
I also have the same problem. but on 9.10.

have you solve the problem? It will be wonderful if you can give some hint.


Hi all.

I'm under Ubuntu server 8.04 and Open-ssh 4.7p1

I need to connect via ssh two servers: S1 to S2

Now what i do:

S1: ssh-keygen -t rsa
S2: mkdir .ssh
S1: cat .ssh/id_rsa.pub | ssh user@S2 'cat >> .ssh/authorized_keys'
S2: chmod 644 .ssh/authorized_keys

This dont works, if i try to connect S1 to S2 always ask me for a password.

Here is my S2 sshd_config



# Package generated configuration file
# See the sshd(8) manpage for details

# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys

# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

UsePAM yes



I edit PermitEmptyPasswords to yes, and dont work.

I uncomment #AuthorizedKeysFile %h/.ssh/authorized_keys but dont works too.

Always when i made a change, i restart sshd

I made everything in https://help.ubuntu.com/community/AdvancedOpenSSH#Troubleshooting and nothing to do.

Previusly, i use Debian etch and i havent any problem with it; now i use S1 (Debian) and S2 (ubuntu)

I unistall openssh-server in S2 and nothing.

I dont know what to do now

pc-cito
April 29th, 2010, 08:19 AM
Not remeber, but i think it was a problem with:

- Users (location of .ssh)
- Default rsa key into server (/etc/ssh/ssh_host_rsa_key.pub)

Iowan
April 29th, 2010, 11:41 PM
Moved to it's own thread as original is a year and a half old.

CharlesA
April 29th, 2010, 11:51 PM
Is your home directory encrypted by chance?