Archiv verlassen und diese Seite im Standarddesign anzeigen : SSH / Schlüssel/ und tja, geht halt net!!!
Kernel-Error
10.02.03, 20:40
Hi!
Habe vor hier ssh nur noch über Schlüssel zu betreiben. Das habe ich schon
alles gemacht:
ssh-keygen -t dsa -b 1024
in /home/user/.ssh/ als id_dsa und id_dsa.pub gespeichert
keine passphrase
mit dem vi in /etc/ssh/sshd_config folgendes gefummelt:
Port 22
Protocol 2
ListenAddress 192.168.0.5
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
RSAAuthentication no
DSAAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication no
KeepAlive yes
Compression yes
Subsystem sftp /usr/lib/ssh/sftp-server
AllowUsers user
So, nach einem /etc/init.d/sshd restart sollte ich mich doch nun mit ssh users@192.168.0.5 einloggen können oder?
Geht aber leider nicht :(
Hat jemand ne Idee?!?!?!
Grüße
:ugly: Kernel Error :ugly:
Windoofsklicker
10.02.03, 20:46
schalte den ssh client mal in den verbose mode (ssh -v) und poste die fehlermeldung.
Kernel-Error
10.02.03, 20:52
Hi!
Die habe ich mir auch schon Stundenlang und noch jeder Änderung in den Configs Stundenlang angeschaut. Aber, hier die Meldung!!
OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090607f
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 pc-01 [192.168.0.5] port 22.
debug1: Connection established.
debug1: identity file /home/user/.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 zlib
debug1: kex: client->server aes128-cbc hmac-md5 zlib
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: dh_gen_key: priv key bits set: 131/256
debug1: bits set: 1614/3191
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'pc-01' is known and matches the RSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:2
debug1: bits set: 1607/3191
debug1: ssh_rsa_verify: signature correct
debug1: kex_derive_keys
debug1: newkeys: mode 1
debug1: Enabling compression at level 6.
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 pubkey: /home/user/.ssh/id_dsa
debug1: authentications that can continue: publickey,keyboard-interactive
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 0x8068fc0(0x0)
debug1: compress outgoing: raw data 606, compressed 548, factor 0.90
debug1: compress incoming: raw data 125, compressed 66, factor 0.53
Vielleicht kommt jemandem ja ne Idee!
MFG
:ugly: Kernel Error :ugly:
Hast du den publickey auf dem Host mit dem sshd auch in ~/user/.ssh/authorized_keys getan?
Grüsse, Stefan
Kernel-Error
10.02.03, 22:26
Die ganze Geschichte läuft gerade nur auf dem Localhost.
Aber dein Vorschlägt lässt irgendwas bei mir klingeln... ist: ~/user/.ssh/authorized_keys ein ordner oder eine Datei?
bei mir liegen die *.pub in ~/user/.ssh/ wie schon beschrieben....
Erläutere das mal näher!
MFG
:ugly: Kernel Error :ugly:
Original geschrieben von Kernel-Error
Die ganze Geschichte läuft gerade nur auf dem Localhost.
Aber dein Vorschlägt lässt irgendwas bei mir klingeln... ist: ~/user/.ssh/authorized_keys ein ordner oder eine Datei?
bei mir liegen die *.pub in ~/user/.ssh/ wie schon beschrieben....
die public-keys müssen per default in $HOME/.ssh/authorized_keys stehen. das ist ein file, in dem alle für diesen account gültigen public-keys stehen. also einfach 'cat bla.pub >> authorized_keys'.
-j
Hi.
Schreib mal die rote Zeile in deine Config.
Port 22
Protocol 2
ListenAddress 192.168.0.5
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
RSAAuthentication no
DSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
PasswordAuthentication no
KeepAlive yes
Compression yes
Subsystem sftp /usr/lib/ssh/sftp-server
AllowUsers user
Das steht jedenfalls in meiner Config. Vielleicht hilft es ja.
HTH
Für SSH V2 kommt der Schlüssel in die authorized_keys2
falls Du Version 2 nehmen möchtest.
Grüße
DaGrrr
Kernel-Error
12.02.03, 12:19
Hi!
Hey, vielen Dank. Werde das nun mal in Ruhe ausprobieren und jep, ich will NUR Protokoll 2 nutzen. Das läuft aber ohne Probleme.
MFG
:ugly: Kernel Error :ugly:
Kernel-Error
13.02.03, 10:01
Hi!
So,
habe ein bissel rumprobiert!!
Liste erst mal einiges auf, ok?
################################################## ############
/home/user/.ssh
../
authorized_keys
authorized_keys2
id_dsa
id_dsa.pub
id_rsa
id_rsa.pub
known_hosts
################################################## ###########
/etc/ssh/ssh_config
# $OpenBSD: ssh_config,v 1.15 2002/06/20 20:03:34 stevesk Exp $
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# Site-wide defaults for various options
# Host *
# ForwardAgent yes
# ForwardX11 yes
# RhostsAuthentication no
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication no
# BatchMode no
# CheckHostIP yes
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
#Protocol 2
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# EscapeChar ~
Host *
ForwardX11 yes
Protocol 2
# CheckHostIP yes
# ConnectionAttempts 2
Compression yes
Port 22
KeepAlive yes
# StrictHostKeyChecking no
################################################## ############################
/etc/ssh/sshd_config
Port 22
Protocol 2
ListenAddress 192.168.0.5
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
RSAAuthentication yes
DSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
PasswordAuthentication no
KeepAlive yes
Compression yes
Subsystem sftp /usr/lib/ssh/sftp-server
AllowUsers user
################################################## ##########
Ausgabe [ssh users@192.168.0.5 -v]
OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090607f
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.0.5 [192.168.0.5] port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa type 1
debug1: identity file /home/user/.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 zlib
debug1: kex: client->server aes128-cbc hmac-md5 zlib
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: dh_gen_key: priv key bits set: 143/256
debug1: bits set: 1608/3191
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '192.168.0.5' is known and matches the RSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:1
debug1: bits set: 1603/3191
debug1: ssh_rsa_verify: signature correct
debug1: kex_derive_keys
debug1: newkeys: mode 1
debug1: Enabling compression at level 6.
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 pubkey: /home/user/.ssh/id_rsa
debug1: authentications that can continue: publickey,keyboard-interactive
debug1: try pubkey: /home/user/.ssh/id_dsa
debug1: authentications that can continue: publickey,keyboard-interactive
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 0x8068fc0(0x0)
debug1: compress outgoing: raw data 814, compressed 704, factor 0.86
debug1: compress incoming: raw data 161, compressed 71, factor 0.44
SO, wie man gut sehen kann, läuft es immer noch nicht.
:(
Hat nun noch jemand eine Idee?!?!
Grüße
:ugly: Kernel Error :ugly:
1. Geht es denn wenn du "PasswordAuthentication yes" einstellst?
2. Bei
debug1: authentications that can continue: publickey,keyboard-interactive
debug1: next auth method to try is publickey
debug1: try pubkey: /home/user/.ssh/id_rsa
debug1: authentications that can continue: publickey,keyboard-interactive
sagt er dass der publickey nicht funktioniert hat, bist du sicher dass du mit ssh_keygen den
privaten Schlüssel auf dem Host wo du ssh eingibst nach $HOME/.ssh/id_dsa und den öffentlichen Schlüssel auf dem sshd Server nach $HOME/.ssh/authorized_keys kopiert hast?
Eventuell solltest du auch mal probieren in die authorized_keys nur einen Schlüssel zu tun.
Grüsse, Stefan
Kernel-Error
13.02.03, 17:18
Hi!
Ja, ALLES schon gemacht!
Läuft net!! Die /etc/hosts.allow usw. stimmen auch alle!!!
Mit Passwordeingabe ist es kein Thema... Läuft sofort!
Grüße
:ugly: Kernel Error :ugly:
Kernel-Error
14.02.03, 10:22
Dewitt schrieb am 14th February 2003 03:42:
hi
welche rechte hat das .ssh Verzeichnis?
Hi!
Es hat die Rechte 700, also darf nur der Besitzer alles!
MFG
:ugly: Kernel Error :ugly:
Dann hast du falsche Schlüssel..
Kernel-Error
14.02.03, 15:13
Hi!
Falsche Schlüsse?
Wie meinst das?
MFG
:ugly: Kernel Error :ugly:
Powered by vBulletin® Version 4.2.5 Copyright ©2024 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.