Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2006-09-14 11:33:46

  masonix - Użytkownik

masonix
Użytkownik
Skąd: Bielsko-Biała
Zarejestrowany: 2006-04-07

ssh odrzuca polaczenie "server refused our key"

Witam.
Nie umiem sobie poradzić z logowaniem na ssh przez klucz rsa, co robie źle?

Mój sshd_config wygląda tak:

Kod:

# 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 0.0.0.0

# Avalible protocols
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 600
PermitRootLogin without-password
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 no to disable s/key passwords
#ChallengeResponseAuthentication yes

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


# To change Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#AFSTokenPassing no
#KerberosTicketCleanup no

# Kerberos TGT Passing does only work with the AFS kaserver
#KerberosTgtPassing yes

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

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

Subsystem       sftp    /usr/lib/sftp-server

UsePAM yes

Tworze klucz RSA dla roota:

ssh-keygen -t rsa
wpisuje passphrase
powstaną 2 pliki:
/root/.ssh/id_rsa     
/root/.ssh/id_rsa.pub

Zmieniam nazwe id_rsa.pub na authorized_keys i nadaje mu prawa chmod 644 i kopiuje do ./ssh/authorized_keys

Plik id_rsa kopiuje jako /etc/ssh/ssh_host_rsa_key

w puttygen.exe konwertuje klucz id_rsa na id_rsa.ppk

Otwieram putty i w configuration/connection/ssh/auth
podaje scieżkę do klucza id_rsa.ppk oraz oczywiscie
ustawiam adres hosta i protokoły dla połączenia.

I gdy daje connect wyświetla mi:

Kod:

Using username "root".
Server refused our key
Using keyboard-interactive authentication.
Password:

Ma ktoś jakiś pomysł?

Pozdrawiam.

/edit

Problem rozwiązany. Coś się pomieszało w kluczach pomogło ponowne wygenerowanie kluczy w debianie.

Pozdrawiam.


http://img209.imageshack.us/img209/3974/debiancu6.png
http://img89.imageshack.us/img89/6861/bashqm1.png

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
To nie jest tylko forum, to nasza mała ojczyzna ;-)