SSH Probleme

messages sagt folgendes

Code:
Jan  4 14:18:12 vs161032 sshd[20276]: Accepted keyboard-interactive/pam for root from xx.xx.xx.xx port 2069 ssh2
Jan  4 14:18:12 vs161032 sshd[20276]: subsystem request for sftp

nur ich seh da keinen fehler :D
 
Und dann haut er dich raus?!
Generiere bitte mal einen neuen Key mit 1024er Länge und setze nur diesem beim Root ein :)
Nur zum Test..
 
Und immernoch das gleiche Problem :)

Edit: Also er haut mich ja nicht raus, nur ich werde dann aufgefordert das PW einzugeben. Nur ich wills ja eigentl. mit Key-Auth :)

Edit-vom-Edit: Hab auch nochma n 1024bit RSA Schlüssel probiert. Funktioniert ebenfalls nicht. :p
 
Last edited by a moderator:
Hallo freakmaker,

womit generierst du deinen Key?

Wenn es mit PuttyGen gemacht wird, dann nimm mal den Inhalt aus der Box und nicht das exportierbare File als Key.

Einfach in eine Datei kopieren und dann per cat in die authorized_keys packen.

Lieben Gruß
Free
 
Das habe ich bereits gemacht :)

Ich bin nach der SSH per Key Anleitung vom debianhowto vorgegangen :)

Wie gesagt bei einem anderen User funktioniert es ja, die Datei authorized_key liegt im Ordner .ssh im Homeverzeichniss ( /home/blakeks/.ssh/authorized_key )

Nur bei Root liegt es natürlich unter /root/.ssh/authorized_key

So langsam bin ich am Verzweifeln :eek:

MfG
 
Hallo freakmaker,

dann versuch doch einfach mal folgendes:

In Putty deaktiveren, dass du dich per PW anmelden darfst.

Dann Verbinden und danach in messages gucken, dort wird dann stehen, wieso es nicht geht.

Wenn dort etwas wie 'Account locked' steht, dann hat der Account z.B. kein Passwort oder ist tatsächlich gesperrt. (Kein Passwort kannman ja ausschließen, wenn du dich per PW einloggen kannst *gG*)

Verusche es einfach weiter einzugrenzen.

Lieben Gruß
Free
 
dann hat der Account z.B. kein Passwort
Accounts ohne Passwort dürfen sich selbstverständlich per Key anmelden.

freakmaker said:
# ls -la ~/.ssh
total 12
drwxr-xr-x 2 root root 4096 Jan 4 10:16 .
drwxr-xr-x 5 root root 4096 Jan 4 10:15 ..
-rw-r--r-- 1 root root 1116 Jan 4 10:15 authorized_keys
Das .ssh-Verzeichnis darf übrigens nicht world-readable sein. Dazu sollte definitiv auch eine entsprechende Meldung im Secure-/Auth-Log auftauchen.

Mach einfach mal ein "chmod -R o-rwx .ssh" und alles ist gut.

BTW: Es heißt Standard - nicht Standart. Siehe dazu auch: Standart - Wikipedia
 
In Putty deaktiveren, dass du dich per PW anmelden darfst.

Dann Verbinden und danach in messages gucken, dort wird dann stehen, wieso es nicht geht.

Und wiederrum sagt er nur

Code:
Jan  4 23:54:12 vs161032 sshd[26385]: Accepted keyboard-interactive/pam for root from 88.73.89.248 port 4123 ssh2
Jan  4 23:54:12 vs161032 sshd[26385]: subsystem request for sftp

Standardmäßg komisch ;)

Edit: So hab jetz mal das Eventlogging von Putty aktiviert. Im Log steht nun folgendes: (stark gekürzt)

Code:
Event Log: Server version: SSH-2.0-OpenSSH_3.9p1
Event Log: We claim version: SSH-2.0-PuTTY_Release_0.58
Event Log: Using SSH protocol version 2
Incoming packet type 20 / 0x14 (SSH2_MSG_KEXINIT)
Outgoing packet type 20 / 0x14 (SSH2_MSG_KEXINIT)
Event Log: Doing Diffie-Hellman group exchange
Outgoing packet type 30 / 0x1e (SSH2_MSG_KEX_DH_GEX_REQUEST)
Incoming packet type 31 / 0x1f (SSH2_MSG_KEX_DH_GEX_GROUP)
Event Log: Doing Diffie-Hellman key exchange
Outgoing packet type 32 / 0x20 (SSH2_MSG_KEX_DH_GEX_INIT)
Incoming packet type 33 / 0x21 (SSH2_MSG_KEX_DH_GEX_REPLY)
Event Log: Host key fingerprint is:
Event Log: ssh-rsa 1024 xx:xx:Xx:xx:xx:xx
Outgoing packet type 21 / 0x15 (SSH2_MSG_NEWKEYS)
Event Log: Initialised AES-256 client->server encryption
Event Log: Initialised HMAC-SHA1 client->server MAC algorithm
Incoming packet type 21 / 0x15 (SSH2_MSG_NEWKEYS)
Event Log: Initialised AES-256 server->client encryption
Event Log: Initialised HMAC-SHA1 server->client MAC algorithm
Outgoing packet type 5 / 0x05 (SSH2_MSG_SERVICE_REQUEST)
Incoming packet type 6 / 0x06 (SSH2_MSG_SERVICE_ACCEPT)
Outgoing packet type 50 / 0x32 (SSH2_MSG_USERAUTH_REQUEST)
Event Log: Reading private key file "*.ppk"
Incoming packet type 51 / 0x33 (SSH2_MSG_USERAUTH_FAILURE)
Outgoing packet type 50 / 0x32 (SSH2_MSG_USERAUTH_REQUEST)
Event Log: Offered public key
[B]Incoming packet type 51 / 0x33 (SSH2_MSG_USERAUTH_FAILURE)
Event Log: Server refused public key[/B]
Outgoing packet type 50 / 0x32 (SSH2_MSG_USERAUTH_REQUEST)
Incoming packet type 60 / 0x3c (SSH2_MSG_USERAUTH_INFO_REQUEST)
Outgoing packet type 61 / 0x3d (SSH2_MSG_USERAUTH_INFO_RESPONSE)
Incoming packet type 60 / 0x3c (SSH2_MSG_USERAUTH_INFO_REQUEST)
Outgoing packet type 61 / 0x3d (SSH2_MSG_USERAUTH_INFO_RESPONSE)
Incoming packet type 52 / 0x34 (SSH2_MSG_USERAUTH_SUCCESS)
Event Log: Access granted
Outgoing packet type 90 / 0x5a (SSH2_MSG_CHANNEL_OPEN)
Incoming packet type 91 / 0x5b (SSH2_MSG_CHANNEL_OPEN_CONFIRMATION)
Event Log: Opened channel for session
Outgoing packet type 98 / 0x62 (SSH2_MSG_CHANNEL_REQUEST)
Incoming packet type 99 / 0x63 (SSH2_MSG_CHANNEL_SUCCESS)
Event Log: Allocated pty (ospeed 38400bps, ispeed 38400bps)
Outgoing packet type 98 / 0x62 (SSH2_MSG_CHANNEL_REQUEST)
Incoming packet type 93 / 0x5d (SSH2_MSG_CHANNEL_WINDOW_ADJUST)
Incoming packet type 99 / 0x63 (SSH2_MSG_CHANNEL_SUCCESS)
Event Log: Started a shell/command

EDIT:

Ohne zu wissen warum: Es funktioniert jetzt!
Das einzige was ich noch gemacht hatte war

Code:
cp authorized_key authorized_key2

und damit den Code halt kopiert. Hatte auch wieder einen SSH2-DSA mit 2048bit ausprobiert. Nun funktioniert es.

Ich danke allen die dabei geholfen haben! :p :D
 
Last edited by a moderator:
Back
Top