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!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Strony: 1
Witam.
Nie umiem sobie poradzić z logowaniem na ssh przez klucz rsa, co robie źle?
Mój sshd_config wygląda tak:
# 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:
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.
Offline
Strony: 1
Time (s) | Query |
---|---|
0.00010 | SET CHARSET latin2 |
0.00004 | SET NAMES latin2 |
0.00172 | 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.15.211.252' WHERE u.id=1 |
0.00087 | REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '3.15.211.252', 1738421592) |
0.00036 | SELECT * FROM punbb_online WHERE logged<1738421292 |
0.00119 | DELETE FROM punbb_online WHERE ident='18.224.43.98' |
0.00093 | DELETE FROM punbb_online WHERE ident='3.15.182.100' |
0.00093 | DELETE FROM punbb_online WHERE ident='52.0.63.151' |
0.00066 | 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.00007 | SELECT search_for, replace_with FROM punbb_censoring |
0.00106 | 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.00083 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=5234 |
Total query time: 0.00876 s |