Autentification SSH avec Putty (Problème)

Bonjour j’ai un drole de problème avec mon acces distant avec Putty. Quand j’ouvre ma session sur SSHD, putty me demande mon user name et par la suite mon mot de passe. Quand j’entre mon mot de passe voici le message :

login as: claude
claude@66.234.21.46’s password:
Access denied
claude@66.234.21.46’s password:

Je ne comprend pas, quand je suis local, ça passe ???
Comment faire pour corriger ce problème ?

Merci!

Quelle est ta distrib ?
Ton firewall est il correctement configure ?

J’utilise OpenSSH et mon firewall me permet de passer sans problème car le login name est demandé.

quelle est ta distrib ?

Distribution de quoi ?
La version de OpenSSH ou Linux ?
Edité le 22/10/2007 à 22:57

de linux :slight_smile:

Y’a pas de “linux” tout court… Y’a debian, ubuntu, fedora, mandriva, opensuse, etc etc etc
Et chaque distrib est produite par une societe ou une organisation non commerciale differente qui fait ses propres choix de logiciels, de versions et de configuration.
Donc il est quasiment indispensable de connaitre le nom et la version de la distrib pour trouver de l’info et la solution.

OpenSuse 10.2.
Edité le 22/10/2007 à 23:05

quelle est l’architecture de ton reseau ?
As tu bien redirige le port 22 de ton routeur vers ton serveur ssh ?

D’apres la doc opensuse, il n’y a rien a faire pour activer l’acces distant de ssh donc il y a un autre probleme qui bloque…

faudrait voir ton fichier de conf d’openssh
il doit y avoir un paramètre qui t’interdit de te loguer en accès distant sur ce compte

KP2 -> J’ai pas vraiment de réseau compliqué, j’ai deux ordinateurs (OpensSuse et Win XP). Pour ce qui est du port 22 oui c’est ok et redirigé sur mon OpenSuse.

Zarathoustra-> Quel est le nom du fichier en question ? As-tu une idée de ce que je devrais regarder dans ce fichier?

Merci!

Les mecs vous vous prennez la tete pour pas grand chose, si les ports sont mal redirigé, alors il n y a pas de communication avec le sshd.

Si il y a communication et probleme, comme le mot de passe, c est le fichier de conf a revoir,

Alors envoie nous ton fichier de conf de sshd.

edit : j avais pas vu c etait déjà demandé …
Edité le 23/10/2007 à 17:15

pour ta distrib je sais pas mais sous debian c’est /etc/ssh/sshd_config

je saurais pas te dire comme ça quelle ligne il faut regarder!
le plus simple étant que tu nous mettes tout ton fichier de conf. il est pas très long

Je vais voir ça ce soir car je n’ai pas acces présentement.

Merci!

mon idee derriere la demande sur la redirection des ports etait que le routeur avait peut etre un serveur ssh existant et recevait la requete d’auth (fausse forcement) a la place de la machine…
C’est pas le cas…

Pour le prob d’auth, il faut voir le fichier de conf mais aussi la conf de pam si openssh l’utilise comme backend…

C’est quand meme bizarre que l’install par defaut sous opensuse empeche un utilisateur non privilegie de se connecter a distance :heink:

Je connais pas la config par defaut de la suse, mais je trouve pas sa surprenant, mon sshd était config comme ça aussi au départ.

SME par exemple interdit toute connection SSH autre que Root… allez savoir pourquoi

C’est quand meme root qu est interdit de base en général … comme tu dis allez savoir pourquoi…

Voici une copie de mon fichier SSHD_CONFIG

#IgnoreUserKnownHosts no

Don’t read the user’s ~/.rhosts and ~/.# $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker Exp $

This is the sshd server system-wide configuration file. See

sshd_config(5) for more information.

This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

The strategy used for options in the default sshd_config shipped with

OpenSSH is to specify options with their default value where

possible, but leave them commented. Uncommented options change a

default value.

#Port 22
#Protocol 2,1
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

HostKey for protocol version 1

#HostKey /etc/ssh/ssh_host_key

HostKeys for protocol version 2

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

Lifetime and size of ephemeral version 1 server key

#KeyRegenerationInterval 1h
#ServerKeyBits 768

Logging

obsoletes QuietMode and FascistLogging

#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO

Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys

For this to work you will also need host keys in /etc/ssh/ssh_known_hosts

#RhostsRSAAuthentication no

similar for protocol version 2

#HostbasedAuthentication no

Change to yes if you don’t trust ~/.ssh/known_hosts for

RhostsRSAAuthentication and HostbasedAuthentication

#IgnoreUserKnownHosts no

Don’t read the user’s ~/.rhosts and ~/.

This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

The strategy used for options in the default sshd_config shipped with

OpenSSH is to specify options with their default value where

possible, but leave them commented. Uncommented options change a

default value.

#Port 22
#Protocol 2,1
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

HostKey for protocol version 1

#HostKey /etc/ssh/ssh_host_key

HostKeys for protocol version 2

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

Lifetime and size of ephemeral version 1 server key

#KeyRegenerationInterval 1h
#ServerKeyBits 768

Logging

obsoletes QuietMode and FascistLogging

#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO

Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys

For this to work you will also need host keys in /etc/ssh/ssh_known_hosts

#RhostsRSAAuthentication no

similar for protocol version 2

#HostbasedAuthentication no

Change to yes if you don’t trust ~/.ssh/known_hosts for

RhostsRSAAuthentication and HostbasedAuthentication

#IgnoreUserKnownHosts no

Don’t read the user’s ~/.rhosts and ~/.shosts files

#IgnoreRhosts yes

To disable tunneled clear text passwords, change to no here!

#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes

Change to no to disable s/key passwords

#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no

Kerberos options

#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

GSSAPI options

#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes

Set this to ‘yes’ to enable PAM authentication, account processing,

and session processing. If this is enabled, PAM authentication will

be allowed through the ChallengeResponseAuthentication and

PasswordAuthentication. Depending on your PAM configuration,

PAM authentication via ChallengeResponseAuthentication may bypass

the setting of “PermitRootLogin without-password”.

If you just want the PAM account and session checks to run without

PAM authentication, then enable this but set PasswordAuthentication

and ChallengeResponseAuthentication to ‘no’.

#UsePAM no
UsePAM yes

Accept locale-related environment variables

AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no

no default banner path

#Banner /some/path

override default of no subsystems

Subsystem sftp /usr/libexec/openssh/sftp-server

Example of overriding settings on a per-user basis

#Match User anoncvs

X11Forwarding no

AllowTcpForwarding no

ForceCommand cvs server

Personne a une idee ?

pour moi, y’a bien ce param qui m’etonne et qui pourrait entrer en conflit avec d’autres backend d’auth :

mais bon :neutre:

T’as touche a la conf par defaut ? faut nous dire tout ca qui a ete fait parce sinon c’est difficile de voir d’ou peut venir le prob. Sous linux, les param ne changent pas par magie et sur ce genre d’applis fondamentales pour les admins systemes, la conf par defaut est tres etudiee…

As tu verifie des choses betes comme la touche maj lock enfoncee, bon pass ?, disposition du clavier ?, etc
As tu touche a la conf de PAM ?
Edité le 26/10/2007 à 09:21