Salut,
Trois jours que je bataille, recherches sur la toile infructueuses.
Pour l’heure je peux me connecter sur le distant en simple utilisateur.
ssh -l mon_user@x.x.x.x
Mais l’accès root met interdit. Chose qui n’était pas auparavant.
J’ai tout remis à plat.
- local et distant.
rm ~/.ssh
rm /root/.ssh
J’ai ensuite recréer deux paires de clés privé/public (rsa et dsa) dans /home/loreleil/.ssh.
J’ai copier les clés /home/loreleil/.ssh/id_rsa.pub sur le distant /home/mon_user/.ssh/authorized_keys.
Le tout en mode rescue. C’est pour l’heure le seul accès root que je possède.
Les droits sur le dédié.
mon_user@ksxxxx:~$ stat -c "%a" .ssh
755
mon_user@ksxxxx:~$
mon_user@ksxxxx:~/.ssh$ stat --printf="%n %a\n" $* ./*
./authorized_keys 600
./id_rsa 600
./id_rsa.pub 600
./known_hosts 600
mon_user@ksxxxx:~/.ssh$
Les droits en local.
loreleil@machine1:~$ stat -c "%a" .ssh
755
loreleil@machine1:~$
loreleil@machine1:~/.ssh$ stat --printf="%n %a\n" $* ./*
./id_dsa 600
./id_dsa.pub 600
./id_rsa 600
./id_rsa.pub 600
./known_hosts 600
loreleil@machine1:~/.ssh$
[quote]:~$ ssh -v mon_user@x.x.x.x.x
OpenSSH_5.5p1 Debian-6+squeeze1, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to x.x.x.x.x [x.x.x.x.x] port 22.
debug1: Connection established.
debug1: identity file /home/loreleil/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/loreleil/.ssh/id_rsa-cert type -1
debug1: identity file /home/loreleil/.ssh/id_dsa type 2
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: identity file /home/loreleil/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-6+squeeze1
debug1: match: OpenSSH_5.5p1 Debian-6+squeeze1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
The authenticity of host ‘x.x.x.x.x (x.x.x.x.x)’ can’t be established.
RSA key fingerprint is y:y:y:y:y:y:y:y:y:y:y:y:y:y:y:y.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/loreleil/.ssh/known_hosts). ???
[/quote]
[code]debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/loreleil/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = fr_FR.UTF-8
Linux ksxxxxx.kimsufi.com 2.6.38.2-grsec-xxxx-grs-ipv6-64 #2 SMP Thu Aug 25 16:40:22 UTC 2011 x86_64 GNU/Linux
server : 22157
ip : x.x.x.x.x
hostname : ksxxxxx.kimsufi.com
Last login: Wed Mar 7 11:47:41 2012 from alille-x-x-x-x.x.abo.wanadoo.fr
Linux ksxxxx.kimsufi.com 2.6.38.2-grsec-xxxx-grs-ipv6-64 #2 SMP Thu Aug 25 16:40:22 UTC 2011 x86_64 GNU/Linux
server : 22157
ip : x.x.x.x.x
hostname : ksxxxx.kimsufi.com
mon_user@ksxxxx:~$ su -
su�: Autorisation refus�e
mon_user@ksxxxx:~$
mon_user@ksxxxx:~$ su
su�: Autorisation refus�e
mon_user@ksxxxx:~$
mon_user@ksxxxx:~$ su root
su�: Autorisation refus�e
mon_user@ksxxxx:~$
mon_user@ksxxxx:~$ su mon_user
su�: Autorisation refus�e
mon_user@ksxxxx:~$
[/code]
Toutes mes manip restent sans succès … ![]()

