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.


[url=http://userbars.org][img]http://img209.imageshack.us/img209/3974/debiancu6.png[/img][/url]
[url=http://userbars.org][img]http://img89.imageshack.us/img89/6861/bashqm1.png[/img][/url]

Offline

 

Stopka forum

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

[ Generated in 0.011 seconds, 15 queries executed ]

Informacje debugowania

Time (s) Query
0.00009 SET CHARSET latin2
0.00004 SET NAMES latin2
0.00132 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.145.163.94' WHERE u.id=1
0.00080 REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '3.145.163.94', 1738421926)
0.00053 SELECT * FROM punbb_online WHERE logged<1738421626
0.00075 DELETE FROM punbb_online WHERE ident='13.58.182.29'
0.00076 DELETE FROM punbb_online WHERE ident='18.217.14.237'
0.00077 DELETE FROM punbb_online WHERE ident='35.169.119.108'
0.00082 DELETE FROM punbb_online WHERE ident='54.80.185.200'
0.00092 SELECT topic_id FROM punbb_posts WHERE id=40777
0.00056 SELECT id FROM punbb_posts WHERE topic_id=5234 ORDER BY posted
0.00061 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=5234 AND t.moved_to IS NULL
0.00005 SELECT search_for, replace_with FROM punbb_censoring
0.00070 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=5234 ORDER BY p.id LIMIT 0,25
0.00072 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=5234
Total query time: 0.00944 s