Probleme mit NX! und public key

Einrichten des lokalen Netzes, Verbindung zu anderen Computern und Diensten.
Antworten
nahemoth
Beiträge: 56
Registriert: 13.03.2005 16:07:19
Kontaktdaten:

Probleme mit NX! und public key

Beitrag von nahemoth » 23.08.2008 11:56:07

Hi,
ich möchte gerne NX! von Nomachine verwenden. Mein SSH ist so konfiguriert, dass es nur mit Schlüssel verwendet werden kann.
Den NX Schlüssel habe ich zur ~/.ssh/authorized_keys hinzugefügt, da ich meine anderen Schlüssel gerne weiterverwenden möchte.

Nun bekomme ich aber immer die Fehlermeldung:

Code: Alles auswählen

NX> 203 NXSSH running with pid: 9721
NX> 285 Enabling check on switch command
NX> 285 Enabling skip of SSH config files
NX> 285 Setting the preferred NX options
NX> 200 Connected to address: 84.160.74.55 on port: 22
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
NX> 204 Authentication failed.
wenn ich password authentication zulasse, dann funktioniert das ganze wieder, aber das möchte ich nicht.

kann mir da jemand weiterhelfen ?

THX!

pingu!
Beiträge: 111
Registriert: 12.09.2005 21:43:45

Re: Probleme mit NX! und public key

Beitrag von pingu! » 23.08.2008 12:50:29

Hi,

Die ssh- keys werden unter

Code: Alles auswählen

/home/USER/.ssh/known_hosts
oder für root

Code: Alles auswählen

/root/.ssh/known_hosts
abgelegt.
Hast Du dort den key von NX auch angegeben?

Gruss pingu!

nahemoth
Beiträge: 56
Registriert: 13.03.2005 16:07:19
Kontaktdaten:

Re: Probleme mit NX! und public key

Beitrag von nahemoth » 23.08.2008 13:52:49

damit hat das nichts zu tun, denke ich, dafür ist ja das authorized_keys-file da. known_hosts gibt nur die bekannten an.

edit:

beim installieren des servers bringt er die meldungen:
Richte nxserver ein (3.2.0-13) ...
NX> 700 Installing: server at: Sa Aug 23 14:37:15 2008.
NX> 700 Autodetected system: debian.
NX> 700 Install log is: /usr/NX/var/log/install.
NX> 700 Creating configuration file: /usr/NX/etc/server.cfg.
NX> 723 Cannot start NX statistics:
NX> 709 NX statistics are disabled for this server.
NX> 700 WARNING: Error when trying to connect to NX server, error is:
NX> 700 WARNING: nxsetup cannot validate the sanity of the current installation:
NX> 700 WARNING: the current system or NX configuration could be broken.
NX> 700 WARNING: If difficulties arise (for example sessions cannot be started),
NX> 700 WARNING: it is advisable that you try to uninstall the NX server and the
NX> 700 WARNING: NX client packages then install them again.
NX> 700 WARNING: Search also the NoMachine Knowledge Base at the URL below:
NX> 700 WARNING: http://www.nomachine.com/kb
NX> 700 WARNING: for common errors encountered when performing a software update
NX> 700 WARNING: and the related hints on how to solve them..
NX> 700 Installation of NX server was completed with warnings.
NX> 700 Please review the install log '/usr/NX/var/log/install'
NX> 700 for further details.
NX> 700 Showing file: /usr/NX/share/documents/server/install-notices
wenn ich /usr/NX/home/nx/.ssh/authorized_keys2 als authorized_keys file in die sshd_config eintrage und passwort authentication in der sshd_config aktiviere, dann lässt er mich über nx rein. der nachteil ist, dass ich mich nichtmehr über meine schlüssel in der konsole einloggen kann. dass sich user über passwort einloggen können hab ich unterbunden mit:

Code: Alles auswählen

Match Group nx Address 127.0.0.1
        PasswordAuthentication yes
Zuletzt geändert von nahemoth am 23.08.2008 14:45:30, insgesamt 1-mal geändert.

pingu!
Beiträge: 111
Registriert: 12.09.2005 21:43:45

Re: Probleme mit NX! und public key

Beitrag von pingu! » 23.08.2008 14:32:49

Hi,

Es ist vielleicht abhänging, wie die ssh die authentication gemacht wird (host based or puplic key authentication)

Bei hostbase authentication wird das file ~/.ssh/known_hosts benötigt, bei puplic key authentication wird das ~/.ssh/authorized gebraucht..

man ssh:

Code: Alles auswählen

Host-based authentication works as follows: If the machine the user logs 
     in from is listed in /etc/hosts.equiv or /etc/ssh/shosts.equiv on the
     remote machine, and the user names are the same on both sides, or if the
     files ~/.rhosts or ~/.shosts exist in the user’s home directory on the
     remote machine and contain a line containing the name of the client
     machine and the name of the user on that machine, the user is considered
     for login.  Additionally, the server must be able to verify the client’s
     host key (see the description of /etc/ssh/ssh_known_hosts and
     ~/.ssh/known_hosts, below) for login to be permitted.  This authentica‐
     tion method closes security holes due to IP spoofing, DNS spoofing, and
     routing spoofing.  [Note to the administrator: /etc/hosts.equiv,
     ~/.rhosts, and the rlogin/rsh protocol in general, are inherently inse‐
     cure and should be disabled if security is desired.]

     Public key authentication works as follows: The scheme is based on pub‐
     lic-key cryptography, using cryptosystems where encryption and decryption
     are done using separate keys, and it is unfeasible to derive the decryp‐
     tion key from the encryption key.  The idea is that each user creates a
     public/private key pair for authentication purposes.  The server knows
     the public key, and only the user knows the private key.  ssh implements
     public key authentication protocol automatically, using either the RSA or
     DSA algorithms.  Protocol 1 is restricted to using only RSA keys, but
     protocol 2 may use either.  The HISTORY section of ssl(8) contains a
     brief discussion of the two algorithms.

     The file ~/.ssh/authorized_keys lists the public keys that are permitted
     for logging in.  When the user logs in, the ssh program tells the server
     which key pair it would like to use for authentication.  The client
     proves that it has access to the private key and the server checks that
     the corresponding public key is authorized to accept the account.
Versuch doch mal das file ~/.ssh/known-hosts anzulegen und dann versuch mal einen Login.

nahemoth
Beiträge: 56
Registriert: 13.03.2005 16:07:19
Kontaktdaten:

Re: Probleme mit NX! und public key

Beitrag von nahemoth » 23.08.2008 14:46:58

hostbase authentication verwende ich sowieso nicht, und nx auch nicht. aber oben hab ich noch editiert, schau ... ganz komisch das ganze ;)

pingu!
Beiträge: 111
Registriert: 12.09.2005 21:43:45

Re: Probleme mit NX! und public key

Beitrag von pingu! » 23.08.2008 15:34:16

Hi,

Ich hab da ne frage. Welche ssh version benutzt Du ssh1 oder ssh2.

Ich nehme mal an es ist ssh2...
Möglicherweise steht da noch ein problem mit PAM im Wege:

bei ssh2 ssh wird dies im file sshd2_config gemacht

Code: Alles auswählen

 # Set this to 'yes' to enable PAM keyboard-interactive authentication
# Warning: enabling this may bypass the setting of 'PasswordAuthentication'
#PAMAuthenticationViaKbdInt yes
Versuch mal

Code: Alles auswählen

PAMAuthenticationViaKbdInt yes
zu aktivieren und dann denn sshd nochmals zu starten.

nahemoth
Beiträge: 56
Registriert: 13.03.2005 16:07:19
Kontaktdaten:

Re: Probleme mit NX! und public key

Beitrag von nahemoth » 23.08.2008 15:37:04

ich komm nich ganz mit, wofür ist das PAM ?

pingu!
Beiträge: 111
Registriert: 12.09.2005 21:43:45

Re: Probleme mit NX! und public key

Beitrag von pingu! » 23.08.2008 15:41:56

PAM (Pluggable Authentication Modules)
Mit PAM werden für verschiedenen Dienste wie Apache, vsftpd, ssh etc. geinsam Sicherheitsreglen verwaltet

http://de.wikipedia.org/wiki/Pluggable_ ... on_Modules

nahemoth
Beiträge: 56
Registriert: 13.03.2005 16:07:19
Kontaktdaten:

Re: Probleme mit NX! und public key

Beitrag von nahemoth » 23.08.2008 15:48:50

jetzt weiss ich was das ist, danke, aber mitkommen tu ich immer noch nicht.
momentan kann ich mich über meinen nx-schlüssel einloggen, das problem ist, dass nx mich nichtmehr rein lässt, sobald ich in die authorized_keys datei einen zweiten eintrage.

pingu!
Beiträge: 111
Registriert: 12.09.2005 21:43:45

Re: Probleme mit NX! und public key

Beitrag von pingu! » 23.08.2008 16:21:00

Wie machst Du denn den eintrag im authorized_keys file?

nahemoth
Beiträge: 56
Registriert: 13.03.2005 16:07:19
Kontaktdaten:

Re: Probleme mit NX! und public key

Beitrag von nahemoth » 23.08.2008 18:06:49

cat nx.id_dsa.bup >> authorized_keys

pingu!
Beiträge: 111
Registriert: 12.09.2005 21:43:45

Re: Probleme mit NX! und public key

Beitrag von pingu! » 23.08.2008 18:16:01

Hi,

hm, sieht ein wenig komisch aus, dein command...

versuch mal

Code: Alles auswählen

cat ~/id_dsa.pub >> ~/.ssh/authorized_keys2

nahemoth
Beiträge: 56
Registriert: 13.03.2005 16:07:19
Kontaktdaten:

Re: Probleme mit NX! und public key

Beitrag von nahemoth » 23.08.2008 18:19:29

is doch das selbe, ich hab die files im selben ordner liegen ...
ich habs auch schon mit nem texteditor versucht.

warum authorized_keys2? in die sshd_config kann nur ein authorized_keys-file eingetragen werden.

pingu!
Beiträge: 111
Registriert: 12.09.2005 21:43:45

Re: Probleme mit NX! und public key

Beitrag von pingu! » 23.08.2008 18:49:24

Hi,

das file authorized_keys2 ist für ssh version 2 und authorized_keys ist für ssh version 1

Dein command ist: cat nx.id_dsa.bup.... das *.bup file passt nicht so richtig.... es sollte *.pup (für puplic) sein.

Welche ssh version ist bei dir installiert ssh 1 oder ssh2?

nahemoth
Beiträge: 56
Registriert: 13.03.2005 16:07:19
Kontaktdaten:

Re: Probleme mit NX! und public key

Beitrag von nahemoth » 23.08.2008 18:59:42

da hab ich mich wohl vertippt.

installiert ist: openssh-server 1:4.7p1-12

pingu!
Beiträge: 111
Registriert: 12.09.2005 21:43:45

Re: Probleme mit NX! und public key

Beitrag von pingu! » 23.08.2008 20:04:34

Hallo,

Ich hab da noch etwas gefunden... vielleicht hilft dir dies weiter....http://www.nomachine.com/ar/view.php?ar_id=AR01C00126

ich hab die ssh authetivication mit known host erstellt, da ich nicht von extern auf den server zugreife....

Gruss pingu!

nahemoth
Beiträge: 56
Registriert: 13.03.2005 16:07:19
Kontaktdaten:

Re: Probleme mit NX! und public key

Beitrag von nahemoth » 23.08.2008 22:42:16

ich glaub der schlüssel liegt darin, dass ich nx-schlüssel für ssh1 erzeugen muss, via nxsetup, nicht für ssh2 via nxserver.

Antworten