PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Mit Windows-Putty auf Linux-SSH


BlauerEngel
2005-09-27, 12:30:48
Hallo zusammen,
verwende Suse-Linux 9.3
manuell: etc/init.d/sshd start

und verwende Windows XP pro
putty.exe gestartet
Linux-Rechner-IP angegeben
Benutzername wird abgefragt: root
Passwort wird abgefragt: ...
Meldung: Access denied

Was muß auf dem Linux-Rechner noch eingestellt werden?
Benötigen die Benutzer Extrarechte für Anmeldung über SSH?

anmeldend
BlauerEngel

Gast
2005-09-27, 12:51:14
Das könnte an einer Einstellung in der /etc/ssh/sshd_config (da liegt sie normalerweise) liegen.

Such mal nach der Zeile:

PermitRootLogin no


So ist es bei mir, und mit dieser Einstellung darf root sich nicht über ssh anmelden.

Möchtest du Root den SSH Zugang erlauben, so setze diesen Wert auf "yes". (Dann den SSH Server neustarten, wahrscheinlich über das Init Script)

Davon würde ich dir aber sicherheitshalber abraten, ssh lieber als normaler Benutzer rein.

BlauerEngel
2005-09-27, 13:29:23
Hi,
danke für die schnelle Antwort.

Bei der Anmeldung mit dem User erscheint die gleiche Meldung.


Gruß
BlauerEngel

Lokadamus - nixBock
2005-09-27, 13:33:38
mmm...

Es müsste ein paar Zeilen unter PermitRootLogin eine Zeile mit Passwordauthentication oder sowas geben, welcher noch auf yes gesetzt werden muss und eventuell das Kommentarzeichen entfernt werden muss. Dann sollte es klappen, kann gerade nicht nachgucken ...

Gast
2005-09-27, 13:56:53
Poste doch einfach mal deine sshd config, schliesslich kann man auch bestimmten Gruppen den Login erlauben etc.

BlauerEngel
2005-09-27, 14:24:29
# $OpenBSD: ssh_config,v 1.19 2003/08/13 08:46:31 markus 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 no
# ForwardX11 no
# If you do not trust your remote host (or its administrator), you
# should not forward X11 connections to your local X11-display for
# security reasons: Someone stealing the authentification data on the
# remote side (the "spoofed" X-server by the remote sshd) can read your
# keystrokes as you type, just like any other X11 client could do.
# Set this to "no" here for global effect or in your own ~/.ssh/config
# file if you want to have the remote X11 authentification data to
# expire after two minutes after remote login.
ForwardX11Trusted yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
PasswordAuthentication yes
# HostbasedAuthentication no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
Port 22
Protocol 2,1
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# EscapeChar ~
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# Set this to 'yes' to enable support for the deprecated 'gssapi' authentication
# mechanism to OpenSSH 3.8p1. The newer 'gssapi-with-mic' mechanism is included
# in this release. The use of 'gssapi' is deprecated due to the presence of
# potential man-in-the-middle attacks, which 'gssapi-with-mic' is not susceptible to.
# GSSAPIEnableMITMAttack no
# This enables sending locale enviroment variables LC_* LANG, see ssh_config(5).
SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
SendEnv LC_IDENTIFICATION LC_ALL

PasswordAuthentication, Port und Protocol war im Standart auch auskommentiert.

Danke an alle die sich das durchlesen.

BlauerEngel

drdope
2005-09-27, 14:29:09
Dumme Zwischenfrage:
Warum konfigurierst du ssh nicht einfach via Yast?

Lokadamus - nixBock
2005-09-27, 14:36:09
PasswordAuthentication, Port und Protocol war im Standart auch auskommentiert.mmm...

Alles, was auskommentiert war, hat entweder Standardwerte oder muss extra konfiguriert werden. Port und Protocol benutzen Standadwerte, ist also egal, ob du es auf die Standardwerte konfigurierst oder auskommentierst. Port ist zum Beispiel interessant, wenn du die Kiste ins Internet stellen willst und den Port aus Sicherheitsgründen auf einen Port irgendwo zwischen 25.000 und 65.000 pflanzt.
Wenn du jetzt noch "RootpermitLogon Yes" drinne hättest, müsstest du dich als root anmelden können. Das es ein Sicherheitsrisiko ist, weist du wohl ...

Flipper
2005-09-27, 14:41:02
Bin kein sshd-Experte, aber mal gucken worans liegen könnte.. füg folgendes hinzu:
UsePAM yes
RSAAuthentication yes
PubkeyAuthentication yes

übrigens:
# Change to yes to enable tunnelled clear text passwords
PasswordAuthentication no
ist bei mir auf "no" gesetzt und alles funktioniert..


für die Sicherheit: Deine config ist ziemlich spartanisch.

Protocol 2,1
Setz das auf Protocol 2 - ist sicherer.
füg das hinzu: PermitEmptyPasswords no

drdope
2005-09-27, 14:44:07
Noch ne dumme Zwischenfrage:
Du bist sicher, das du die richtige Datei editierst?
auf meinen Suse 9.2 Server beginnt die /etc/ssh/sshd_config mit:
# $OpenBSD: sshd_config,v 1.69 2004/05/23 23:59:53 dtucker Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
imho editierst du die ssh client config, also /etc/ssh/ssh_config

Sephiroth
2005-09-27, 14:48:56
Noch ne dumme Zwischenfrage:
Du bist sicher, das du die richtige Datei editierst?
auf meinen Suse 9.2 Server beginnt die /etc/ssh/sshd_config mit:

imho editierst du die ssh client config, also /etc/ssh/ssh_config
Ja tut er
# $OpenBSD: ssh_config,v 1.19 2003/08/13 08:46:31 markus Exp $
# This is the ssh client system-wide configuration file. See

Also BlauerEngel, sshd_config bearbeiten ;)

BlauerEngel
2005-09-27, 15:22:19
So! Als allererstes mal - Es läuft :)

Danke an alle die gelesen und nachgedacht haben.
Hatte tatsächlich die falsche Datei bearbeitet :rolleyes:
aber auch in der sshd_config waren alle Angaben wie sie sein sollten.

Im dem Rechner stecken zwei Netzwerkkarten und gerade kam mir die Idee, PuTTY mit der anderen NIC zu verbinden, und siehe da, es läuft :|

Ist schon komisch.
Warum ist das so? Kann man die Karte auch irgendwo einstellen?

Danke nochmal :massa:

BlauerEngel