PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : SSH Key Probelm



Thallez
02.02.03, 11:21
Ich habe versucht mein SSH ohne passwörter zu betreiben aber jedesmal wenn ich mich anmelde kommt dieser fehler

[Thallez@wkst02 Thallez]$ ssh -v 192.168.123.20
OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to 192.168.123.20 [192.168.123.20] port 22.
debug1: Connection established.
debug1: identity file /home/Thallez/.ssh/identity type -1
debug1: identity file /home/Thallez/.ssh/id_rsa type -1
debug1: identity file /home/Thallez/.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_3.4p1
debug1: match: OpenSSH_3.4p1 pat OpenSSH*
Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.4p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: dh_gen_key: priv key bits set: 126/256
debug1: bits set: 1617/3191
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '192.168.123.20' is known and matches the RSA host key.
debug1: Found key in /home/Thallez/.ssh/known_hosts:1
debug1: bits set: 1613/3191
debug1: ssh_rsa_verify: signature correct
debug1: kex_derive_keys
debug1: newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: waiting for SSH2_MSG_NEWKEYS
debug1: newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: done: ssh_kex2.
debug1: send SSH2_MSG_SERVICE_REQUEST
debug1: service_accept: ssh-userauth
debug1: got SSH2_MSG_SERVICE_ACCEPT
debug1: authentications that can continue: publickey,keyboard-interactive
debug1: next auth method to try is publickey
debug1: try privkey: /home/Thallez/.ssh/identity
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@
Permissions 0664 for '/home/Thallez/.ssh/identity' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /home/Thallez/.ssh/identity
Enter passphrase for key '/home/Thallez/.ssh/identity':

wenn ich jetzt auf enterdrücke weil ich kein passwort gesetzt ahbe schmeisst er mich raus

wo dran kann das liegen

thf für eure mühen im vorraus

scrat
02.02.03, 13:14
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@
Permissions 0664 for '/home/Thallez/.ssh/identity' are too open.
-
die identity file darf nur von dir selbst lesbar sein, d.h. muss die permissions 0600 haben...

chmod 600 /home/Thallez/.ssh/identity

Thallez
02.02.03, 18:05
danke das hat mir schon weitergeholfen aber
jetzt kommt diese fehlermeldung und ich werd daraus auch einfach nicht schlau

ich muss mich ohne eingabe von passwort auf den server einloggen können das heisst auch kein password
für den key ich bekommt aber immer diesen fehler jetzt


[Thallez@wkst02 Thallez]$ ssh -v 192.168.123.1
OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to 192.168.123.1 [192.168.123.1] port 22.
debug1: Connection established.
debug1: identity file /home/Thallez/.ssh/identity type -1
debug1: identity file /home/Thallez/.ssh/id_rsa type 1
debug1: identity file /home/Thallez/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.4p1
debug1: match: OpenSSH_3.4p1 pat OpenSSH*
Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.4p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: dh_gen_key: priv key bits set: 121/256
debug1: bits set: 1577/3191
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '192.168.123.1' is known and matches the RSA host key.
debug1: Found key in /home/Thallez/.ssh/known_hosts:2
debug1: bits set: 1608/3191
debug1: ssh_rsa_verify: signature correct
debug1: kex_derive_keys
debug1: newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: waiting for SSH2_MSG_NEWKEYS
debug1: newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: done: ssh_kex2.
debug1: send SSH2_MSG_SERVICE_REQUEST
debug1: service_accept: ssh-userauth
debug1: got SSH2_MSG_SERVICE_ACCEPT
debug1: authentications that can continue: publickey,keyboard-interactive
debug1: next auth method to try is publickey
debug1: try privkey: /home/Thallez/.ssh/identity
debug1: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
Enter passphrase for key '/home/Thallez/.ssh/identity':
debug1: try pubkey: /home/Thallez/.ssh/id_rsa
debug1: authentications that can continue: publickey,keyboard-interactive
debug1: try privkey: /home/Thallez/.ssh/id_dsa
debug1: next auth method to try is keyboard-interactive
debug1: authentications that can continue: publickey,keyboard-interactive
debug1: no more auth methods to try
Permission denied (publickey,keyboard-interactive).
debug1: Calling cleanup 0x80674b0(0x0)
[Thallez@wkst02 Thallez]$



danke für die hilfe

babbel
24.06.06, 00:34
Hallo zusammen,

Ich hab ein ähnliches Problem wie User Thallez vor mir beschrieben hat. Jedoch treten diese Probleme nur beim login unter Linux auf, unter Windows XP mit PUTTY funktioniert alles (und das bei 2 verschiedenen Rechnern, 1x SuSE 9.2, 1x SuSE 10.1).

Der private-key (.ppk) wurde mit puttygen unter Windows erstellt und nach Linux (SuSE 10.1) kopiert und liegt im (home)Verzeichnis des Users mit dem sich eingelogt wird. Beim Aufruf von ssh allerdings kommt immer eine Abfrage nach der passphrase, was aber eigentlich nicht sein dürfte, da der key ohne selbige erstellt wurde.
Weiterhin ist mir aufgefallen, dass im ppk-file "Windows-Zeilenumbrüche" enthalten sind ("^"), das entfernen dieser brachte jedoch auch nicht die gewünschte Besserung.

Hier die Ausgabe von 'ssh -v linux-host':


~/.ssh> ssh -v linux-host
OpenSSH_4.2p1, OpenSSL 0.9.8a 11 Oct 2005
debug1: Reading configuration data /home/uhser/.ssh/config
debug1: Applying options for linux-host
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to linux-host [192.168.13.254] port 22.
debug1: Connection established.
debug1: identity file /home/uhser/.ssh/linux-host-id_dsa.ppk type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.2
debug1: match: OpenSSH_4.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'linux-host' is known and matches the RSA host key.
debug1: Found key in /home/uhser/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/uhser/.ssh/linux-host-id_dsa.ppk
debug1: PEM_read_PrivateKey failed <--- ???
debug1: read PEM private key done: type <unknown> <--- ???
Enter passphrase for key '/home/uhser/.ssh/linux-host-id_dsa.ppk':
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).


Jetzt unter Linux ein WinXP unter VMWare zu installieren, scheint mir nur für den ssh-Zugang "etwas" zu übertrieben, obwohl ich kurz davor stehe nachdem Ich einige Postings hier gelesen und mit Google erfolglos gesucht hab'.

Thema Sicherheit sollte hier keine allzugroße Rolle spielen, da alle Rechner in einem von aussen nicht erreichbaren LAN hängen.

Hoffe jemand kann mir helfen :ugly:, vielen Dank schonmal im Vorraus....

fladi.at
24.06.06, 10:16
OpenSSH unter Linux kann mit den ppk-Files von Putty nichts anfangen. Du musst deinen Key nochmal mit PuttyGen laden, und dann über die Option "Export" ins OpenSSH-Format exportieren.

babbel
24.06.06, 17:30
OpenSSH unter Linux kann mit den ppk-Files von Putty nichts anfangen. Du musst deinen Key nochmal mit PuttyGen laden, und dann über die Option "Export" ins OpenSSH-Format exportieren.
Hat wunderbar geklappt - Vielen Dank !