[SSH] Auth keys werken niet tussen SSH en OpenSSH(windows)

Pagina: 1
Acties:

  • Unique
  • Registratie: Januari 2001
  • Laatst online: 10-05-2025
Hallo,

Na lang prutsen krijg ik de automatische login via auth keys niet aan de gang.
Het zit zo, de server draait OpenSSH op win2000 ( http://lexa.mckenna.edu/sshwindows/ ) en de client is een linux bak met "SSH Secure Shell 3.2.5 (non-commercial version) on i686-pc-linux-gnu"

Probleem is nu om de auth keys aan de gang te krijgen. Dit is een veel voorkomende vraag en google heeft me vele paginas laten zien van hoe maak je keys, en waar zet je ze neer etc, maar kon me niet echt verder helpen.

Probleem is dus die linux bak via de key te laten authenten op de windows openssh server.
(dit werkt btw vlekkeloos als ik winxp ssh > win2k doe... dus server schijnt de rsa keys te accepten )

Als errors krijg ik dit:
user1@linux:~/.ssh2> ssh -v -i maxim.key -p 1000 ssh.mine.nu
debug: SshConfig/sshconfig.c:2810/ssh2_parse_config_ext: Metaconfig parsing stopped at line 3.
debug: SshConfig/sshconfig.c:3102/ssh_config_read_file_ext: Read 0 params from config file.
debug: Ssh2/ssh2.c:1707/main: User config file not found, using defaults. (Looked for '/home/user1/.ssh2/ssh2_config')
debug: Connecting to ssh.mine.nu, port 1000... (SOCKS not used)
debug: Ssh2Transport/trcommon.c:3665/ssh_tr_create: My version: SSH-1.99-3.2.5 SSH Secure Shell (non-commercial)
debug: client supports 3 auth methods: 'publickey,keyboard-interactive,password'
debug: Ssh2Common/sshcommon.c:537/ssh_common_wrap: local ip = 1.78.204.57, local port = 1761
debug: Ssh2Common/sshcommon.c:539/ssh_common_wrap: remote ip = x.x.x.x, remote port = 1000
debug: SshConnection/sshconn.c:1945/ssh_conn_wrap: Wrapping...
debug: SshReadLine/sshreadline.c:2427/ssh_readline_eloop_initialize: Initializing ReadLine...
debug: Remote version: SSH-2.0-OpenSSH_3.7.1p1
debug: OpenSSH: Major: 3 Minor: 7 Revision: 1
debug: Ssh2Transport/trcommon.c:962/ssh_tr_input_version: All versions of OpenSSH handle kex guesses incorrectly.
debug: Ssh2Transport/trcommon.c:1356/ssh_tr_negotiate: lang s to c: `', lang c to s: `'
debug: Ssh2Transport/trcommon.c:1422/ssh_tr_negotiate: c_to_s: cipher aes128-cbc, mac hmac-sha1, compression none
debug: Ssh2Transport/trcommon.c:1425/ssh_tr_negotiate: s_to_c: cipher aes128-cbc, mac hmac-sha1, compression none
debug: Remote host key found from database.
debug: Ssh2Common/sshcommon.c:332/ssh_common_special: Received SSH_CROSS_STARTUP packet from connection protocol.
debug: Ssh2Common/sshcommon.c:382/ssh_common_special: Received SSH_CROSS_ALGORITHMS packet from connection protocol.

****USAGE WARNING****

This is a private computer system. This computer system, including all
etc...

debug: server offers auth methods 'publickey,password,keyboard-interactive'.
debug: Ssh2AuthPubKeyClient/authc-pubkey.c:1742/ssh_client_auth_pubkey: Starting pubkey auth...
debug: Ssh2AuthPubKeyClient/authc-pubkey.c:1699/ssh_client_auth_pubkey_agent_open_complete: Agent is not running.
debug: Ssh2AuthPubKeyClient/authc-pubkey.c:1497/ssh_client_auth_pubkey_agent_list_complete: Got 0 keys from the agent.
warning: /home/user1/.ssh2/maxim.key: 4: parsing line failed.
warning: /home/user1/.ssh2/maxim.key: 5: parsing line failed.
warning: /home/user1/.ssh2/maxim.key: 6: parsing line failed.
etc..
debug: Ssh2AuthPubKeyClient/authc-pubkey.c:1477/ssh_client_auth_pubkey_add_candidates: Trying 0 key candidates.
debug: Ssh2AuthPubKeyClient/authc-pubkey.c:931/ssh_client_auth_pubkey_try_this_candidate: All keys declined by server, disabling method.
debug: Ssh2AuthClient/sshauthc.c:319/ssh_authc_completion_proc: Method 'publickey' disabled.
debug: server offers auth methods 'publickey,password,keyboard-interactive'.
debug: Ssh2AuthKbdInteractiveClient/authc-kbd-interactive.c:342/ssh_client_auth_kbd_interact: Starting kbd-int auth...
debug: server offers auth methods 'publickey,password,keyboard-interactive'.
debug: Ssh2AuthPasswdClient/authc-passwd.c:105/ssh_client_auth_passwd: Starting password auth...
user1's password:
Zo das zon beetje de errors, kheb de public key op de server geadd in .ssh\authorized_keys en zou dus moeten werken.

Daar de auth key verification mooi werkt met een winxp client, lijkt me dat de server ok is ingesteld?¿

Probleem ligt dus mijnsinziens op de client.
Hij geeft ook die parse error, wat ik maar niet gefixed krijg..

maxim.key ziet er zo uit:
---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----
Subject: user1
Comment: "1024-bit rsa, user1@linux, Mon Mar 22 2004 22:55:17 +0100"
P2/56wAAAi4AAAA3aWYtbW9kbntzaWdue3JzYS1wa2NzMS1zaGExfSxlbmNyeXB0e3JzYSO...... etc
---- END SSH2 ENCRYPTED PRIVATE KEY ----
Iemand een idee?
Kdacht al met ssh version mismatches ofzo, dus moet ik die ssh2 key misschien converteren naar een ssh1 key, geen idee hoe dat gaat 8)7 Ik snap er nix meer van.

Sorry voor de ietwat onduidelijke post, maar ik hoop dat iemand me kan helpen...

ps wat me opvalt is het grote verschil ook tussen de windows pub key en die van linux:
windows:
ssh-rsa AAAAB3NzaAAAA.................nwMKB2dwmRcYn3tjA1rh6bZ33dk= Uni@unique

linux:
---- BEGIN SSH2 PUBLIC KEY ----
Subject: user1
Comment: "1024-bit rsa, user1@linux, Mon Mar 22 2004 22:55:17 +0100"
AAAAB3NzaC1yc2EA.................
---- END SSH2 PUBLIC KEY ----
lijkt me dus andere versie??

edit:

Net een openssh versie geinstalled en dan werkt het in 1 keer.
Dit slaat echt alles, normale ssh kan dus niet overweg met een openssh server?? :(

[ Voor 17% gewijzigd door Unique op 23-03-2004 00:53 ]


  • marko77
  • Registratie: Februari 2002
  • Laatst online: 06-05-2025
Even een subtiele kick met de opmerking dat je Openssh wel degelijk met SSH kan laten werken op deze manier.

Ikzelf heb er de hele dag mee lopen pielen, en ik wil toch even het antwoord hier posten, voor als er mensen zijn met hetzelfde probleem (en dat zijn er nogal wat volgens google )

De truc is dat je de public key die je maakt om moet zetten naar openssh formaat
tevens dien je de gemaakte private key te renamen naar 'identification'

dus:

- keys aanmaken
- op de client machine rename je joukey_dsa >> identification
- kopieer de public key naar de server waar je heen wilt connecten en voer dan dit commando uit :
ssh-keygen -i -f jouwkey_dsa >> jouwkey_openssh

- de openssh key voeg je vervolgens toe aan de 'authorized_keys' file v.d. server
- chmod 600 authorized_keys (voor de rechten)

hth :P

Mijn rig