Slt,
J’ai mis en place sur un VPS, debian 6 squeeze
Lors de ma sécurisation ssh, j’ai un soucis d’identification par clefs privé publique, je m’explique:
-
Lorsque je mets ma clef dans /home/monuser/authorized_key
Tout est bon l’identification fonctionne normalement. -
Lorsque je veux mettre cette même clef dans ~/.ssh (comme c’est préconisé)
La clef ne fonctionne pas, j’ai l’erreur “Server refused our key”
/J’ai bien lu tous les tutos dispos à travers le we pour résoudre ce prob notamment le chmod 700 du rep et 600 du fichier, en vain.
/J’ai bien vérifié la présence de la clef dans /.ssh
/ la clef fonctionne car quand elle est dans /home/monuser/ ton va bien
Je pensais à probe de permission, j’ai donc changer le own et grp de /.ssh/authorized_key qui étaient à root et que j’ai passé en monuser mais le problème persiste.
Voila donc ce que j’ai à la base
s15434929:~/.ssh# ls -la
total 12
drwx------ 2 root root 4096 Feb 26 10:42 .
drwxr-xr-x 5 root root 4096 Feb 26 10:35 ..
-rw------- 1 root root 226 Feb 26 10:42 authorized_keys
[code]# Package generated configuration file
See the sshd(8) manpage for details
What ports, IPs and protocols we listen for
Port 4122
Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768
Logging
SyslogFacility AUTH
LogLevel INFO
Authentication:
LoginGraceTime 20
PermitRootLogin no
StrictModes yes
AllowUsers monuser
RSAAuthentication no
PubkeyAuthentication yes
AuthorizedKeysFile ~/.ssh/authorized_keys
Don’t read the user’s ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
similar for protocol version 2
HostbasedAuthentication no
Uncomment if you don’t trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no
Change to yes to enable challenge-response passwords (beware issues with
some PAM modules and threads)
ChallengeResponseAuthentication no
Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes
Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
X11Forwarding no
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
Allow client to pass locale environment variables
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM no
[/code]
Note: je me connecte avec putty
Bref si quelqu’un à une idée, merci